Surface Booleans
Versione 1.0.0 (1,88 MB) da
Eric Trudel
A script to demonstrate Boolean operations between two closed volumes. Procedures are implemented to ensure resulting meshes are watertight.
The main script titled "surface_booleans_script.m" contains the body of this submission.
Firstly, a cube and sphere are generated using a convex hull algortihm.
Afterwards the intersections of both shapes is performed using Jaroslaw Tuszynski SurfaceIntersection function (triangle-triangle intersection algorithm).
The intersecting edges are organized into open and closed loops ( form_intersection_loops_boolean() ).
These closed loops are used as a seed for a flood fill algortihm for organizing each face into a corresponding closed volume.
A boolean matrix is tabulated to determine which volume is associated with a Union, Subtraction or Intersection operation.
There are issues with co-planar triangles and floating point imprecision. However, there are checks in the main script that will alert the user if the surface boolean is acheivable or not.
For a better implementation of surface booleans I would actually recommend using the ISO2MESH package. The advantage of this code however is that it is purely coded inside of MATLAB.
Cita come
Eric Trudel (2024). Surface Booleans (https://www.mathworks.com/matlabcentral/fileexchange/122502-surface-booleans), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2020b
Compatibile con R2020b e release successive
Compatibilità della piattaforma
Windows macOS LinuxTag
Riconoscimenti
Ispirato da: Surface Intersection
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0 |