evanw / csg.js

Constructive solid geometry on meshes using BSP trees in JavaScript
http://evanw.github.com/csg.js/
MIT License
1.79k stars 264 forks source link

fix csg build #16

Open LinJiarui opened 9 years ago

LinJiarui commented 9 years ago

resolve the following issue: when build 2 or more coplanar polygons, the original method maybe split all the polygons into the front node (or the back node), thus leads to stackoverflow.

bhouston commented 9 years ago

We are trying to make a centralized active repository here: https://github.com/csg-js/csg.js

LinJiarui commented 9 years ago

So, should I create a new pull request for the active repository?

stefnotch commented 4 years ago

This PR causes doesn't handle coplanar polygons correctly. The following script shows this rather nicely:

var a = CSG.cube();
var b = CSG.cube({ center: [-0.25, 0, -0.25] });
a.setColor(1, 1, 0);
b.setColor(0, 0.5, 1);
return a.subtract(b);