nicklockwood / Euclid

A Swift library for creating and manipulating 3D geometry
MIT License
644 stars 53 forks source link

subtract mesh to export obj file #94

Closed vml933 closed 2 years ago

vml933 commented 2 years ago

Hi, I create a cube mesh than use subtract to cut my game model, it look fine in sceneKit, but I use MDLAsset to export obj file, the obj file still show the cube mesh,

Is possible preserve the subtract mesh only?

Here is the obj file screenshot, the right part is gameModel, the left part is the subtract cube model I wish not preserve https://imgur.com/cNxGW90.jpg

vml933 commented 2 years ago

I just resolve it by using mesh.polygonsByMaterial function to filter game model polygons, and create the new mesh with these polygons, thanks