added meaningful subd vert test

This commit is contained in:
Stephen M. McQuay
2012-05-15 22:57:44 -06:00
parent e0460a0b8d
commit 71f99ba58d
2 changed files with 9 additions and 8 deletions
+7 -3
View File
@@ -14,12 +14,16 @@ class TestCC(unittest.TestCase):
'blender', 'samples')
self.cube_file_name = os.path.join(self.samples_dir, 'cube.json')
self.cube = json.load(open(self.cube_file_name, 'r'))
self.cube_file_name = os.path.join(self.samples_dir, 'cube-blender-cc-1.json')
self.cube1 = json.load(open(self.cube_file_name, 'r'))
def test_refine(self):
def test_refined_vertex_location(self):
p = PolygonMesh(**self.cube)
p2 = cc.refine(p)
# TODO: this test is meaningless ...
p2
v2 = [list(i) for i in p2.vertices]
for a, b in zip(sorted(self.cube1['vertices']), sorted(v2)):
for i in xrange(len(a)):
self.assertAlmostEqual(a[i], b[i])
if __name__ == '__main__':
unittest.main(verbosity=3)