198a7d7ca8
- Wasn't calculating faces for a give original vert correctly - vertices generated by surf.subd.cc.refine look about right - still missing edge and face connectivity
26 lines
668 B
Python
26 lines
668 B
Python
import json
|
|
import os
|
|
import unittest
|
|
|
|
from surf.geometry import PolygonMesh
|
|
from surf.subd import cc
|
|
|
|
|
|
class TestCC(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
path, file_name = os.path.split(__file__)
|
|
self.samples_dir = os.path.join(path, os.pardir, os.pardir, os.pardir,
|
|
'blender', 'samples')
|
|
self.cube_file_name = os.path.join(self.samples_dir, 'cube.json')
|
|
self.cube = json.load(open(self.cube_file_name, 'r'))
|
|
|
|
def test_refine(self):
|
|
p = PolygonMesh(**self.cube)
|
|
p2 = cc.refine(p)
|
|
# TODO: this test is meaningless ...
|
|
p2
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(verbosity=3)
|