Code review and small corrections over the new interfaces dor physics and usage factories

This commit is contained in:
Guille 2021-01-08 09:37:38 -05:00
parent f2292a53e3
commit 5c93b64cd3

View File

@ -79,16 +79,11 @@ class TestGeometryFactory(TestCase):
city = City.load(self._kelowna_pickle_file) city = City.load(self._kelowna_pickle_file)
helper = GeometryHelper(delta=0.0, area_delta=0.5) helper = GeometryHelper(delta=0.0, area_delta=0.5)
errors = 0 errors = 0
ok = 0
for building in city.buildings: for building in city.buildings:
building._polyhedron._geometry = helper building._polyhedron._geometry = helper
if str(building.volume) == 'inf': if str(building.volume) == 'inf':
building.stl_export(self._output_path) building.stl_export(self._output_path)
errors += 1 errors += 1
elif ok == 0:
building.stl_export(self._output_path)
print(f'ok {building.name} {building.volume}')
ok = 1
print(f'{errors} buildings aren\'t closed volumes') print(f'{errors} buildings aren\'t closed volumes')
def test_citygml_buildings(self): def test_citygml_buildings(self):