forked from s_ranjbar/city_retrofit
Fix unit tests and remove debug information
This commit is contained in:
parent
9c0483f1d8
commit
96fa465d42
|
@ -65,10 +65,6 @@ class Polyhedron:
|
||||||
def _point(coordinates):
|
def _point(coordinates):
|
||||||
return coordinates[0], coordinates[1], coordinates[2]
|
return coordinates[0], coordinates[1], coordinates[2]
|
||||||
|
|
||||||
def _ground_coordinates(self, surface):
|
|
||||||
for point in surface.points:
|
|
||||||
print(point[0] - self.min_x, point[1] - self.min_y, point[2] - self.min_z)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_regions(point_index, points_list):
|
def _get_regions(point_index, points_list):
|
||||||
if point_index == 0:
|
if point_index == 0:
|
||||||
|
@ -98,10 +94,6 @@ class Polyhedron:
|
||||||
# last point in the polygon so the triangle is n, 0, 1
|
# last point in the polygon so the triangle is n, 0, 1
|
||||||
triangle_right = ' '.join(str(e) for e in [*points_list[len(points_list) - 3:], *points_list[0:6]])
|
triangle_right = ' '.join(str(e) for e in [*points_list[len(points_list) - 3:], *points_list[0:6]])
|
||||||
rest_points_right = ' '.join(str(e) for e in [*points_list[3:]])
|
rest_points_right = ' '.join(str(e) for e in [*points_list[3:]])
|
||||||
if len(triangle_right) < 3:
|
|
||||||
print(f'error right!!!! {triangle_right}')
|
|
||||||
if len(triangle_left) < 3:
|
|
||||||
print(f'error right!!!! {triangle_left}')
|
|
||||||
return (Surface(triangle_left, remove_last=False), Surface(rest_points_left, remove_last=False)), \
|
return (Surface(triangle_left, remove_last=False), Surface(rest_points_left, remove_last=False)), \
|
||||||
(Surface(triangle_right, remove_last=False), Surface(rest_points_right, remove_last=False))
|
(Surface(triangle_right, remove_last=False), Surface(rest_points_right, remove_last=False))
|
||||||
|
|
||||||
|
@ -160,7 +152,6 @@ class Polyhedron:
|
||||||
for sub_surface in sub_surfaces:
|
for sub_surface in sub_surfaces:
|
||||||
face = []
|
face = []
|
||||||
points = sub_surface.points
|
points = sub_surface.points
|
||||||
print(points)
|
|
||||||
for point in points:
|
for point in points:
|
||||||
face.append(self._position_of(point, face))
|
face.append(self._position_of(point, face))
|
||||||
self._faces.append(face)
|
self._faces.append(face)
|
||||||
|
@ -173,7 +164,6 @@ class Polyhedron:
|
||||||
@property
|
@property
|
||||||
def _polyhedron_mesh(self):
|
def _polyhedron_mesh(self):
|
||||||
if self._mesh is None:
|
if self._mesh is None:
|
||||||
print(self.faces)
|
|
||||||
self._mesh = Trimesh(vertices=self.vertices, faces=self.faces)
|
self._mesh = Trimesh(vertices=self.vertices, faces=self.faces)
|
||||||
return self._mesh
|
return self._mesh
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user