feat: complete supported Sketcher and PartDesign ABI contract
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

This commit is contained in:
2026-08-11 20:34:23 -04:00
parent 2be18a511e
commit aa607451ad
20 changed files with 918 additions and 62 deletions

View File

@@ -1772,6 +1772,16 @@ FCStd 双向往返新增真实 `Part::Cut` 穿孔文档:`20 x 20 x 10` Box 由
TSN 门不再只读取 Pad/Pocket 两份报告。它现在汇总 16 份 Chrome/WASM 原生 history 报告,逐份校验 provider、operation registry、Worker/WASM、关系计数、结果 Solid、stage input/result/topology、专用 marker 和释放后 `0/0`19 类 operation 的证据为 `19/19`,缺失为 `0`。Pocket、Revolution、Groove、Hole、MultiTransform 的 17 个显式 stage 继续逐级校验,其他专用 builder 由操作报告和 marker 绑定。`EX-TSN-01` 因此更新为 `completed`exact 计划计数为 `2 completed / 36 in_progress / 14 pending / 0 blocked`
命名 oracle 同时修正了旧的误分类。FreeCAD 运行时 219 个阶段中74 个派生/操作阶段要求私有 MappedName现为 `required=74 / complete=74`145 个基础或支持阶段由原生 API 明确返回 `IndexedName-only`,不再被错误统计为 145 个缺失私有 token。42 个 Part/PartDesign builder 阶段均具有直接 `getElementHistory/getElementMappedName/getElementIndexedName` 证据,结果为 `42/42`、missing `0`。这只闭合锁定 oracle 的证据,不代表浏览器 OCCT 能为任意新模型执行 FreeCAD 私有命名算法:浏览器仍没有 `MappedNameRef/StringHasher` callback ABI原生 token 仍限于 fixture/oracle非唯一同构来源仍必须保持 ambiguous。
命名 oracle 同时修正了旧的误分类。FreeCAD 运行时 219 个阶段中74 个派生/操作阶段要求私有 MappedName现为 `required=74 / complete=74`145 个基础或支持阶段由原生 API 明确返回 `IndexedName-only`,不再被错误统计为 145 个缺失私有 token。42 个 Part/PartDesign builder 阶段均具有直接 `getElementHistory/getElementMappedName/getElementIndexedName` 证据,结果为 `42/42`、missing `0`。这只闭合锁定 oracle 的证据,不代表浏览器 OCCT 能为任意新模型执行 FreeCAD 私有命名算法:当时浏览器尚无 `MappedNameRef/StringHasher` callback ABI原生 token 仍限于 fixture/oracle非唯一同构来源仍必须保持 ambiguous。
真实 CI oracle lane 已调整为先重跑核心参数、全部 Part/PartDesign、复合命名和 FCStd oracle再生成参数报告并执行检查Chrome lane在所有 `test:chrome-*` 重跑后执行 19-operation TSN 聚合门,避免读取旧报告。当前 `systemExact=false``EX-TSN-02=pending``EX-TSN-04=pending``EX-REL-01=pending`、exact modules `0/34`;剩余工作不得用锁定 fixture 的 token 代替浏览器实时私有命名回调。
## 229. 2026-08-11 Sketcher/PartDesign 参数合同与 FreeCAD 私有命名 ABI v1
Sketcher 数据模型和 FCStd codec 已覆盖 FreeCAD 1.1.1 的完整原生几何类型表:在 Point/Line/Circle/Arc/Ellipse/B-spline 基础上新增 `GeomArcOfEllipse``GeomArcOfHyperbola``GeomArcOfParabola`,并补齐 InternalAlignment 原生编号 `5/6/7/8/11` 的双曲线主轴/副轴/焦点与抛物线焦点/焦轴。9 类 geometry、19 类 constraint、10 类 InternalAlignment 语义由公开常量锁定;新圆锥曲线和 helper geometry 已通过 FCStd 写出、解析和 Web ID 恢复测试。basic TypeScript solver 对尚未求解的圆锥曲线明确返回 unsupported不伪装成已求解。
新增 `partDesignParameters.ts`,将当前 Facade 支持的 Datum/ShapeBinder、Pad/Pocket、Revolution/Groove、Loft/Pipe、dress-up、transform/pattern 和 Hole 共 21 个 family 建成 202 个属性槽、72 个语义分区的可执行合同。对象创建和属性编辑现在统一检查两侧长度/角度、Midplane 冲突、Up-to-face 引用、自定义向量、Loft section、Pipe spine、Chamfer 模式、pattern occurrence/方向和 Hole cut/thread 组合。经锁定桌面对象探针对账FreeCAD 实际注册的同名字段进入 FCStd native property 白名单;`AxisLink`、显式方向向量、`ThreadPitch` 等 Web 兼容字段仍按动态属性保存,不冒充原生属性。
新增 `FreeCADPrivateNamingABI v1`:三项 Embind 回调分别报告 ABI version、锁定 FreeCAD 1.1.1/commit/operation 能力,并按 JSON 请求返回命名证据。Direct provider 与 Worker 都传输输入 STEP、最终 STEP/BRep、stage DAG 和 OCCT history回包必须包含原生/歧义状态、MappedNameRef、StringHasher、ElementMap2并通过 stage/result 上下文、16/32 MiB 上限、StringID、ElementMap2 和两者引用闭包检查。缺回调、版本/提交不符、operation 未声明或证据不合法均不生成 token继续保留 `final-shape-only`
`config/freecad-sketcher-partdesign-abi-contract.json``check:freecad-sketcher-partdesign-abi` 已进入默认 Sketcher 门禁Facade 为 `190/190`独立合同门、Facade boundary、锁定 FreeCAD 原生 FCStd 门和全量 `verify` 均通过。这里完成的是支持范围内的参数合同、FCStd 表面和私有 ABI/传输/验证层;当前随附的 `native/occt-history` 仍未链接 FreeCAD 私有 C++,所以浏览器实时命名实现仍为 `not-linked``EX-TSN-02``pending` 转为 `in_progress`,机器计划为 `2 completed / 37 in_progress / 13 pending / 0 blocked``systemExact=false` 和 promotion fail-closed 状态不变。