Skip to content

Commit 1552d1a

Browse files
committed
Latest manifold library seems to have changed algorithm for merging
1 parent 9828bf1 commit 1552d1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ def test_cylinder(self):
229229
mesh = Model.cylinder(segments).get_manifold().to_mesh()
230230
mesh = trimesh.Trimesh(vertices=mesh.vert_properties, faces=mesh.tri_verts, process=False)
231231
self.assertEqual(mesh.bounds.tolist(), [[-1, -1, -0.5], [1, 1, 0.5]])
232-
self.assertEqual(len(mesh.vertices), 2*segments)
233-
self.assertEqual(len(mesh.faces), 4*(segments-1))
232+
self.assertEqual(len(mesh.vertices), 2*segments+2)
233+
self.assertEqual(len(mesh.faces), 4*segments)
234234
if segments == 4:
235235
self.assertAlmostEqual(mesh.area, 4*(1+math.sqrt(2)))
236236
self.assertAlmostEqual(mesh.volume, 2)
@@ -244,8 +244,8 @@ def test_cone(self):
244244
mesh = Model.cone(segments).get_manifold().to_mesh()
245245
mesh = trimesh.Trimesh(vertices=mesh.vert_properties, faces=mesh.tri_verts, process=False)
246246
self.assertEqual(mesh.bounds.tolist(), [[-1, -1, -0.5], [1, 1, 0.5]])
247-
self.assertEqual(len(mesh.vertices), segments+1)
248-
self.assertEqual(len(mesh.faces), 2*(segments-1))
247+
self.assertEqual(len(mesh.vertices), segments+2)
248+
self.assertEqual(len(mesh.faces), 2*segments)
249249
if segments == 4:
250250
self.assertAlmostEqual(mesh.area, 2*(1+math.sqrt(3)))
251251
self.assertAlmostEqual(mesh.volume, 2/3)

0 commit comments

Comments
 (0)