File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1365,6 +1365,8 @@ def tessellate(
1365
1365
1366
1366
loc = TopLoc_Location ()
1367
1367
poly = BRep_Tool .Triangulation_s (f .wrapped , loc )
1368
+ if poly is None :
1369
+ continue
1368
1370
Trsf = loc .Transformation ()
1369
1371
reverse = (
1370
1372
True
Original file line number Diff line number Diff line change @@ -5732,3 +5732,16 @@ def test_iterators(self):
5732
5732
5733
5733
res7 = list (fs .siblings (c , "Edge" , 2 ))
5734
5734
assert len (res7 ) == 2
5735
+
5736
+ def test_tessellate (self ):
5737
+
5738
+ # happy flow
5739
+ verts , tris = Face .makePlane (1 , 1 ).tessellate (1e-3 )
5740
+
5741
+ assert len (verts ) == 4
5742
+ assert len (tris ) == 2
5743
+
5744
+ # this should not crash, but return no verts
5745
+ verts , _ = Face .makePlane (1e-9 , 1e-9 ).tessellate (1e-3 )
5746
+
5747
+ assert len (verts ) == 0
You can’t perform that action at this time.
0 commit comments