Skip to content

Commit 24d3c34

Browse files
committed
an empty CSG is ok.
1 parent 314fca2 commit 24d3c34

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • src/main/java/eu/mihosoft/vrl/v3d

src/main/java/eu/mihosoft/vrl/v3d/CSG.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,13 @@ public CSG processPolygonsToTriangles(ArrayList<Polygon> polygons) throws Coline
307307
}
308308
}
309309

310-
if (triList.isEmpty())
311-
throw new IllegalArgumentException("CSG produced no valid triangles after triangulation");
312-
310+
if (triList.isEmpty()) {
311+
vertices = new double[0];
312+
triangles = new long[0];
313+
vertCount=0;
314+
triCount=0;
315+
return this;
316+
}
313317
vertCount = vertexList.size();
314318
triCount = triList.size() / 3;
315319

0 commit comments

Comments
 (0)