问题
I'm trying to develop a 3D object editor with Three.js, where letting the user to perform CSG operations such as union, intersection, subtract, etc.I used source code from "Three.js Editor" for the main functions of loading the stl file, and rendering the object.
And now, I'd like to add-in CSG functions for users to do dynamic CSG function. I found "CSG.js" and "JSModeler.js" for performing the CSG operations.My intention is to load the stl files, then customise(union, subtract) the objects using the CSG operation on the go. My ideal is to be like "123D Design", at least for the Boolean operation; select the objects on the canvas and perform the operation
So, my question is How should i go about selecting the multiple objects on the canvas to do the CSG operation. I'm new to three.js and still learning, so possibly where should I look for the literature or reference to achieve this kind of function?
Thank you in advance.
回答1:
You should be able to use ThreeCSG. Here's a tutorial: http://learningthreejs.com/blog/2011/12/10/constructive-solid-geometry-with-csg-js/
来源:https://stackoverflow.com/questions/22138151/how-to-do-dynamic-csg-operation-with-three-js