How to do Dynamic csg operation with three.js

独自空忆成欢 提交于 2019-12-11 09:19:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!