Surface Booleans

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.

引用格式

Eric Trudel (2026). Surface Booleans (https://ww2.mathworks.cn/matlabcentral/fileexchange/122502-surface-booleans), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: Surface Intersection

一般信息

MATLAB 版本兼容性

  • 与 R2020b 及更高版本兼容

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0