Skip to content

Commit 45e900e

Browse files
committed
add test for Mesh.to_point()
1 parent 0123782 commit 45e900e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/compas/datastructures/test_mesh.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,23 @@ def test_to_lines():
340340
assert len(lines) == mesh.number_of_edges()
341341

342342

343+
def test_to_points():
344+
# tri
345+
mesh = Mesh.from_shape(Polyhedron.from_platonicsolid(4))
346+
points = mesh.to_points()
347+
assert len(points) == 4
348+
349+
# quad
350+
mesh = Mesh.from_shape(Polyhedron.from_platonicsolid(6))
351+
points = mesh.to_points()
352+
assert len(points) == 8
353+
354+
# ngon
355+
mesh = Mesh.from_shape(Polyhedron.from_platonicsolid(12))
356+
points = mesh.to_points()
357+
assert len(points) == 20
358+
359+
343360
# --------------------------------------------------------------------------
344361
# helpers
345362
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)