Skip to content

Commit fbab0ca

Browse files
committed
fix the issue where group of a hole with an object it doesnt touch
caused an error
1 parent 5c6c773 commit fbab0ca

File tree

1 file changed

+7
-3
lines changed
  • src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle

1 file changed

+7
-3
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/Group.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,17 @@ public List<CSG> process(List<CSG> incoming) {
7373
if (intersect)
7474
result = intersect(solids);
7575
else
76-
result =solids.size()==1?solids.get(0): CSG.unionAll(solids);
76+
result =solids.size()==1?solids.get(0).clone(): CSG.unionAll(solids);
7777
Color c = result.getColor();
7878
if (hull) {
7979
result = result.hull();
8080
}
81-
if (holecutter != null)
82-
result = result.difference(holecutter);
81+
if (holecutter != null) {
82+
if(result.getBounds().isBoundsTouching(holecutter.getBounds())) {
83+
result = result.difference(holecutter);
84+
}
85+
}
86+
8387
result.setIsHole(false);
8488
result.setColor(c);
8589
}

0 commit comments

Comments
 (0)