Are there MATLAB functions or scripts to perform boolean operations on triangulated solids?
Show older comments
It is a very specific question. There is no need for more details.
Accepted Answer
More Answers (2)
If you mean you want to take intersections and unions of meshes, then no, there are no MathWorks-authored commands to do that. However, there are FEX files that let you convert a mesh to a binary volume and back, e.g.,
so you might be able to do it by transfering to the binary image domain if you can tolerate some discretization error.
1 Comment
Jahir Pabon
on 27 Nov 2024
John D'Errico
on 27 Nov 2024
0 votes
Are there such codes in MATLAB? Yes. I wrote them. intersect, union. In 2-d and in 3-d. (Not sure if I wrote a setdiff variant. Probably not, as the problem I was working on would not need them.) Are they publically available? No. Sorry. The codes belong to my client. I'm not sure they are still in use, but I don't own them.
You want them to retain the original "simplicity" of the triangulations? Sorry, but no. The result tends to get quite complicated near the boundaries.
Could you write something? They were not that terrible to implement. Kind of slow if the tessellations were large, but that always happens. You can start with these operations on a pair of tetrahedra.
1 Comment
Jahir Pabon
on 27 Nov 2024
Categories
Find more on STL (STereoLithography) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


