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

Save as PLY? #25

Open r03ert0 opened 4 years ago

r03ert0 commented 4 years ago

Hello! How should one go for saving a resulting polygon as PLY, STL or something else? Can that be done from inside csg.js? Or is there another recommended library? thank you!

correaelias commented 3 years ago

Csg.js dont have a method for this(it focus on csg operations), but writing one is simples, just access the polygons array in your CSG object, every polygon is made of CSG.Vertex containing a position and a normal of type CSG.Vector.

Sintay1994 commented 3 years ago

Csg.js dont have a method for this(it focus on csg operations), but writing one is simples, just access the polygons array in your CSG object, every polygon is made of CSG.Vertex containing a position and a normal of type CSG.Vector.