File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
tests/compas/datastructures Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 11import pytest
2+ import random
23
34import compas
45
@@ -334,3 +335,26 @@ def test_loops_and_strips_open_corner(grid):
334335 assert edge in loop
335336 assert len (loop ) == 10
336337 assert edge == loop [- 1 ]
338+
339+
340+ def test_loops_and_strips_open_boundary (grid ):
341+ assert grid .number_of_edges () == 220
342+
343+ edge = random .choice (grid .edges_on_boundary ())
344+ u , v = edge
345+
346+ loop = grid .edge_loop (edge )
347+ strip = grid .edge_strip (edge )
348+
349+ assert edge in strip
350+ assert len (strip ) == 11
351+ assert grid .is_edge_on_boundary (* strip [0 ])
352+ assert grid .is_edge_on_boundary (* strip [- 1 ])
353+
354+ assert edge in loop
355+ assert len (loop ) == 10
356+
357+ if grid .halfedge [u ][v ] is None :
358+ assert edge == strip [- 1 ]
359+ else :
360+ assert edge == strip [0 ]
You can’t perform that action at this time.
0 commit comments