Skip to content

Commit

Permalink
Fixed issue #624.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Aug 19, 2024
1 parent 1b6f219 commit 63458b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/org/nschmidt/csg/CSG.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,11 @@ public CSG union(CSG csg) {
throw new LDPartEditorException(ie);
}

final List<Polygon> polygons = new ArrayList<>(c1.polygons);
polygons.addAll(c2.polygons);
final List<Polygon> unifiedPolygons = new ArrayList<>(c1.polygons.size() + c2.polygons.size());
unifiedPolygons.addAll(c1.polygons);
unifiedPolygons.addAll(c2.polygons);

return CSG.fromPolygons(polygons);
return CSG.fromPolygons(unifiedPolygons);
}

/**
Expand Down

0 comments on commit 63458b4

Please sign in to comment.