ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
brep_boolean.h 文件参考

B-Rep 级别的布尔运算 更多...

#include "vde/brep/brep.h"
brep_boolean.h 的引用(Include)关系图:

浏览源代码.

命名空间

 vde
 
 vde::brep
 

函数

BrepModel vde::brep::brep_union (const BrepModel &a, const BrepModel &b)
 B-Rep 布尔并集: A ∪ B 更多...
 
BrepModel vde::brep::brep_intersection (const BrepModel &a, const BrepModel &b)
 B-Rep 布尔交集: A ∩ B 更多...
 
BrepModel vde::brep::brep_difference (const BrepModel &a, const BrepModel &b)
 B-Rep 布尔差集: A \ B 更多...
 

详细描述

B-Rep 级别的布尔运算

对 BrepModel 实体执行精确的布尔运算,区别于基于网格的布尔运算 (后者通过 mesh_boolean.h 提供)。

B-Rep 布尔运算 vs 网格布尔运算

特性 B-Rep 布尔 网格布尔
精度 精确(解析曲面) 近似(离散三角形)
速度 较慢(需要曲面交线计算) 较快
输出 B-Rep 模型 三角网格
适用场景 CAD 精确建模 实时/渲染/快速原型

典型工作流

  1. 通过 modeling.h 创建基本体(如 make_box + make_cylinder)
  2. 使用本文件的布尔运算组合它们
  3. 通过 to_mesh() 或 export_step() 导出结果

在文件 brep_boolean.h 中定义.