From 6ea41b1c852b34068c2e1a3a471667827abc159f Mon Sep 17 00:00:00 2001 From: guille Date: Thu, 16 Mar 2023 12:03:23 -0400 Subject: [PATCH] export to obj completed --- hub/exports/formats/obj.py | 4 ---- hub/unittests/test_geometry_factory.py | 3 --- 2 files changed, 7 deletions(-) diff --git a/hub/exports/formats/obj.py b/hub/exports/formats/obj.py index 7e51655e..0be1faf7 100644 --- a/hub/exports/formats/obj.py +++ b/hub/exports/formats/obj.py @@ -41,11 +41,7 @@ class Obj: for surface in building.surfaces: obj.write(f'# surface {surface.name}\n') face = 'f ' - len_ = len(surface.perimeter_polygon.coordinates) - if len_ > 40: - print(len_, building.name) for coordinate in surface.perimeter_polygon.coordinates: - vertex = self._to_vertex(coordinate) if vertex not in vertices.keys(): vertex_index += 1 diff --git a/hub/unittests/test_geometry_factory.py b/hub/unittests/test_geometry_factory.py index 29647af4..35e439dd 100644 --- a/hub/unittests/test_geometry_factory.py +++ b/hub/unittests/test_geometry_factory.py @@ -141,9 +141,6 @@ class TestGeometryFactory(TestCase): hub.exports.exports_factory.ExportsFactory('obj', city, self._output_path).export() self.assertEqual(195, len(city.buildings), 'wrong number of buildings') self._check_buildings(city) - for building in city.buildings: - for wall in building.walls: - self.assertIsNotNone(wall.percentage_shared, 'wall percentage shared is not assigned') def test_map_neighbours(self): """