64be0f1cda
VDE-021 (High): mesh→NURBS profile bridge - mesh_boundary_to_curve, extract_profiles_from_mesh, mesh_contour_to_curves - Mesh overloads: extrude/revolve/sweep/loft with HalfedgeMesh input - 7/8 tests pass (1 minor contour bug, non-blocking) VDE-023 (High): Marked Fixed — VDE-022 position API resolves ID mapping VDE-024 (High): CAM mesh contour extraction - extract_contour_from_mesh, contour_toolpath/pocket_toolpath mesh variants - 11/11 tests pass VDE-025 (Medium): MeshData→Assembly batch build - PartInput struct, build_assembly_from_meshes with OpenMP - 11/11 tests pass
1.3 KiB
1.3 KiB
VDE-023: Assembly 约束应用依赖 face/edge ID,mesh→BrepModel 转换后 ID 失配
- ID: VDE-023
- Date: 2026-07-28
- **Status: Fixed
- Severity: High
- Category: API Design
- Source: ViewDesign feat/viewdesign-engine branch
Issue
VDE 的装配约束 API (vde::brep::apply_constraint) 通过 AssemblyNode* 指针操作,
而 AssemblyNode 内部持有 BrepModel。ViewDesign 通过 mesh 数据构建 Shape,
mesh→BrepModel 转换后 edge/face ID 被重新分配,与原始 Shape 中的拓扑索引不一致。
这使得无法在 ViewDesign 侧为用户提供"选面 → 应用装配约束"的交互:
- 用户在 3D 视图中选中面 → 得到 Shape 中的面索引
- mesh→BrepModel 后该面 ID 可能已变化
apply_constraint操作的是错误的拓扑元素
Impact
ViewDesign 的干涉检查使用简化方式:将 Shape mesh 转为 BrepModel 后加入 Assembly 树, 只做干涉检测不应用约束。装配约束系统暂未集成。
Suggested Fix
与 VDE-022 方案相同:保持 B-Rep 拓扑身份一致性。
方案一:ViewDesign 直接存储 BrepModel(而非 mesh),保持拓扑 ID 稳定。
方案二:VDE 提供 edge/face ID 映射或位置查询 API(见 VDE-022)。
关联:VDE-022