CSG operation with STLLoader

后端 未结 1 524
渐次进展
渐次进展 2021-01-26 15:34

I am trying to perform a boolean operation on an imported STL mesh file using the ThreeCSG.js. Here is the code..

function openFile() {
filePath = document.form.         


        
相关标签:
1条回答
  • 2021-01-26 16:01

    OK figured out the answer myself. For anyone who is a beginner with three.js, it is important to understand the concept of UVs texture mapping. See here http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV. Now, there is no UV co-ords. available in the STL files so many of the three.js functions don't work as desired. One way, I found to overcome this issue was to import the STL files in blender and perform a UV mapping and then export the geometry files as a JSON object (You will also need to install a three.js exporter with blender). You can then perform Boolean operations on the JSON geometries with three.js

    0 讨论(0)
提交回复
热议问题