ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
boolean_mesh.h
浏览该文件的文档.
1 
11 #pragma once
12 #include "vde/boolean/boolean_2d.h"
13 #include "vde/core/polygon.h"
14 #include "vde/mesh/halfedge_mesh.h"
15 
16 namespace vde::boolean {
17 using core::Point2D;
18 using core::Polygon2D;
19 using mesh::HalfedgeMesh;
20 
21 // ── Core 3D mesh boolean operations ──────────────────────────────
22 
44 
60 
76 
92 
93 // ── Helpers ─────────────────────────────────────────────────────
94 
116  bool invert_b = false);
117 
130 
146 
164 
165 // ── Point classification ────────────────────────────────────────
166 
189 bool is_point_inside_mesh(const core::Point3D& p, const HalfedgeMesh& mesh);
190 
191 } // namespace vde::boolean
二维多边形布尔运算
半边数据结构三角网格
Definition: halfedge_mesh.h:54
bool is_point_inside_mesh(const core::Point3D &p, const HalfedgeMesh &mesh)
判断三维点是否在封闭网格内部
HalfedgeMesh mesh_boolean(const HalfedgeMesh &a, const HalfedgeMesh &b, BooleanOp op)
网格布尔运算统一接口
HalfedgeMesh mesh_union(const HalfedgeMesh &a, const HalfedgeMesh &b)
网格并集 A ∪ B
BooleanOp
布尔运算类型
Definition: boolean_2d.h:22
HalfedgeMesh mesh_difference(const HalfedgeMesh &a, const HalfedgeMesh &b)
网格差集 A − B
HalfedgeMesh invert_mesh(const HalfedgeMesh &m)
翻转网格所有面片的法线方向
HalfedgeMesh mesh_intersection(const HalfedgeMesh &a, const HalfedgeMesh &b)
网格交集 A ∩ B
HalfedgeMesh clip_mesh(const HalfedgeMesh &a, const HalfedgeMesh &b, bool invert_b=false)
用网格 B 裁剪网格 A
HalfedgeMesh mesh_sym_diff(const HalfedgeMesh &a, const HalfedgeMesh &b)
网格对称差 (A − B) ∪ (B − A)
HalfedgeMesh merge_meshes(const HalfedgeMesh &a, const HalfedgeMesh &b)
合并两个网格
foundation::Point2D Point2D
双精度二维点(重新导出)
Definition: point.h:29
foundation::Point3D Point3D
双精度三维点(重新导出)
Definition: point.h:31