Files
ViewDesignEngine/include
hm 6b96c0c788 fix(brep/mesh): 修正反馈 A 组 VDE-1193/1194/1195 — 边去重/序列化异常/网格绕向自检
VDE-1194 BrepModel::add_edge_unique 改用无向键 (min<<32)|max 去重,
并以惰性 unordered_map 索引替代 O(E) 线性扫描;修复一致取向三角网格
公共边反向遍历导致去重失效、watertightness 恒 0 的误报
(box 网格共享边 30→18,diag_err 1→0)。新增 3 项单测。

VDE-1195 BinarySerializer::read_file 打不开/读取失败抛 std::runtime_error,
deserialize 校验 VDE 魔数/版本/体量并抛异常;C ABI vde_deserialize_mesh
捕获异常返回 nullptr,避免异常穿越 C 边界。新增 3 项单测。

VDE-1193 定位体积坍缩根因:to_mesh 输出为逐面独立三角汤(公共边顶点不焊接)
且绕向混杂,散度定理体积在内部抵消;repair_mesh 的 fix_orientation/fill_holes
原为空实现、flipped_faces 恒 0。新增 mesh::weld_and_unify_orientation
(空间哈希焊接 + 共享边 BFS 绕向统一 + 分量有符号体积翻正),
MeshHealingReport 补齐 boundary_edges / winding_consistent / outward_oriented
自检字段;vde_step_probe 增加 vol_cons/wt/winding_ok/outward 输出。
box_000_none 体积 0→4.080、box_007_rotate 0→800.000,test_cube 保持
1000000 无回归。新增 3 项单测(共 13 项通过)。

验证:test_brep 30 通过、test_serializer 8 通过、test_mesh_repair 13 通过,
GetDiagnostics 无错误。
2026-09-10 22:21:09 +08:00
..