wolph / numpy-stl

Simple library to make working with STL files (and 3D objects in general) fast and easy.
http://numpy-stl.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
605 stars 103 forks source link

can we merge 2 stl files such that they are overlapping, and we dont have to take care about overlapping traingles #167

Closed haxer-max closed 3 years ago

wolph commented 3 years ago

That sounds like concatenating the two meshes. That's easily done:


new_mesh = mesh.Mesh(numpy.concatenate([
    mesh_a.data.copy(),
    mesh_b.data.copy(),
]))
haxer-max commented 3 years ago

@WoLpH ya but these doesn't really take care of intersection, lets say there are 2 cubes to be intersected side wise to create cuboid, the intersecting face of cube should get deleted, but it doesn't happen.

wolph commented 3 years ago

Very true, I assumed that was what you meant with not caring about overlapping triangles. Properly merging meshes is a lot harder to do and a little outside of the scope of this library.

The big problem with merging meshes is that you need to create and destroy triangles within your mesh. Since this library is based on numpy arrays that's hard to do, beyond recreating.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.