Files
茂之钳 2a5a84670c
CI / Build & Test (push) Failing after 37s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
fix(feedback): properly close **Status** bold markdown in VDE-021/023/024/053/054
Commit 92f13b6 added trailing ** but left the opening ** unclosed after the
Status label, producing **Status**: Fixed** instead of **Status**: Fixed.
2026-07-29 11:36:47 +08:00

1.3 KiB
Raw Permalink Blame History

VDE-023: Assembly 约束应用依赖 face/edge IDmesh→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