nicklockwood / Euclid

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

UNION operation result is with HOLE #92

Closed PrashantKT closed 2 years ago

PrashantKT commented 2 years ago

I am performing union operation with two STL

The result of the union is with hole ,expected result is to merge both MODEL and create single model

See the Image of Result Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2022-06-03 at 17 38 28

Attached the Result STL file + Input model RESULT.stl.zip Inputs Model.zip

Thanks in advance :)

nicklockwood commented 2 years ago

@PrashantKT the issue is that the IOScanupper_16.stl isn't watertight - it has holes in it. The union function only works with closed solids. Unfortunately I don't have a function that can fill these holes automatically at the moment.

PrashantKT commented 2 years ago

@nicklockwood Okay Thanks - I will merge both with Scenekit

nicklockwood commented 2 years ago

@PrashantKT if you merely wish to combine the meshes you can use Euclid's Mesh.merge() function. I assumed you were using union because it removes overlapping polygons, but if you don't need that you can use merge.

PrashantKT commented 2 years ago

@nicklockwood Okay I will try Thanks