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

There is stuff still left in the middle. #1

Closed treeform closed 12 years ago

treeform commented 12 years ago

var a = CSG.cube(); var b = CSG.sphere({ radius: .4, stacks: 12 }); var c = CSG.cylinder({ radius: 0.9, start: [-1, 0, 0], end: [1, 0, 0] }); var d = CSG.cylinder({ radius: 0.3, start: [0, -1, 0], end: [0, 1, 0] }); var e = CSG.cylinder({ radius: 0.3, start: [0, 0, -1], end: [0, 0, 1] }); return a.subtract(b).subtract(c).subtract(d).subtract(e);

evanw commented 12 years ago

Thanks for finding this bug. Here's a simpler test case, which may be the root of the problem:

var a = CSG.cube();
var b = CSG.cylinder();
return a.subtract(b).union(b).subtract(b);
evanw commented 12 years ago

fixed in f76b8ef16c817fd80092955fed7bcddf4a2df5d1