feat(v4.3): wall thickness analysis — centroid-offset sampling
CI / Build & Test (push) Failing after 24s
CI / Release Build (push) Failing after 25s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled

- analyze_wall_thickness(): samples surface points, computes min distance
  to vertices/centroids on other faces (no mesh tessellation needed)
- WallThicknessResult: min/max/avg, thin_threshold, thick_threshold
- 3 new tests, 29/29 passing
This commit is contained in:
茂之钳
2026-07-25 07:23:28 +00:00
parent 93852075dd
commit 1db1a83c5d
3 changed files with 121 additions and 0 deletions
+20
View File
@@ -60,4 +60,24 @@ struct BomEntry {
/// 生成扁平合并的物料清单(按名称排序)
[[nodiscard]] std::vector<BomEntry> generate_bom(const AssemblyNode& node);
// ── Wall thickness analysis ──
/// 壁厚分析结果
struct WallThicknessResult {
double min_thickness = 0.0; ///< 最小壁厚
double max_thickness = 0.0; ///< 最大壁厚
double avg_thickness = 0.0; ///< 平均壁厚
int thin_regions = 0; ///< 薄壁区域数(< thin_threshold
int thick_regions = 0; ///< 厚壁区域数(> thick_threshold
double thin_threshold = 1.0; ///< 薄壁判定阈值
double thick_threshold = 10.0; ///< 厚壁判定阈值
};
/// 壁厚分析:沿各面法向采样,射线检测对面距离
/// @param body B-Rep 实体
/// @param samples_per_face 每个面的采样点数(默认 5×5=25)
/// @return 壁厚统计结果
[[nodiscard]] WallThicknessResult analyze_wall_thickness(const BrepModel& body,
int samples_per_face = 5);
} // namespace vde::brep