- 扩展 CDSL engine 的 shell、sweep、loft、reference plane、pattern 等运行时能力, 支持新的实体结果模式、双向拉伸、曲线扫掠、镜像/圆周阵列及相关 selector 解析。 - 完善 Build123d 适配层的拓扑快照、Compound/ShapeList 兼容处理和旋转曲面识别, 兼容 Python 3.12 / 当前 Build123d 缺少 axis_of_rotation 的合法曲面场景。 - 扩展 CDSL schema、profile schema、capability analysis、semantic validation 和 sketch solver,使新增建模操作能够被校验、执行并保留可诊断的部分结果。 - 完善 CADFS FeatureScript lowering: 支持 shell、sweep、surface/实体 loft、圆周阵列副本、镜像副本、删除阵列实例、 新 body 操作、更多拉伸终止条件和 reference plane 变体。 - 补齐椭圆、B-spline、环形区域、imprint、SWEPT_FACE、CAP_FACE、OFFSET_FACE 等 草图和拓扑引用的转换逻辑,改善后续特征的工作平面、轴线和 profile 定位精度。 - 改进 selector binding:支持 pattern 前缀复合 B-rep 快照、交集顶点引用、 多面 match_mode=all、圆柱轴线/半径和面积下限等稳定匹配条件。 - 修复 MID_PLANE 法向统一后交线方向未同步的问题,恢复 00287955 基准面的正确位置; 修复 00542223 sweep 路径反转后的切线契约和 00423838 的拓扑面数不稳定测试假设。 - 修正 CADFS 比较模块 import 路径,补充重建报告、批量重建脚本、目标文档和 README。 - 新增并扩展 engine、lowering、parser、selector binding、reports、integration 和 Onshape pipeline 回归测试,覆盖代表性 CADFS 特征链及运行时兼容性。
Local CDSL Engine
This package rebuilds cad.cdsl.llm.v1 models through the CDSL-only path:
semantic validation -> capability analysis -> sketch resolution -> session runtime -> STEP
runtime.py owns the executor registry, an ExecutionSession, and the
feature/topology lifecycle. build123d_adapter.py is the only layer that
creates or mutates B-rep objects. runtime_types.py owns runtime-neutral
feature, context, selector, and topology contracts. llm_compiler.py and
llm_engine.py remain available for legacy engine-plan compatibility but are
not used by run_cdsl_only.
Supported profiles are defined by SHAPE_GENERATORS in sketch_solver.py.
Supported feature atomic operations are defined by EXECUTORS in runtime.py.
Their human-readable contract is in profile_schema.json; the complete,
machine-enforced CDSL object contract is in cdsl_schema.json.
The Studio only accepts self-contained profile data and requires successful
engine=cdsl_only output. It never uses the legacy translator fallback or
compiler_context.
Engine schema maintenance
profile_schema.json and cdsl_schema.json together are the source of truth
for the engine contract exposed to the CAD Agent and the backend validator.
Any addition, removal, rename, or parameter-contract change in
sketch_solver.py, runtime.py, or the build adapter must update both files
in the same change.
backend/tests/test_profile_schema.py fails when the registered profiles or
supported atomic operations diverge from the document.
Batch baseline
Use the resumable batch entry point to produce feature-level eligibility and
rebuild reports. --build invokes only the session-based CDSL runtime; it
never falls back to compiler_context or the legacy translator.
PYTHONPATH=backend/engine python -m cdsl_engine.batch_rebuild \
json_to_cdsl/output --out /tmp/cdsl-batch --build --build-timeout 15
The output directory contains manifest.json, one report per part under
parts/, summary-by-atomic.json, and summary-by-blocker.json. Re-run the
same command to resume completed work; use --max-parts to run a bounded CI
shard.
Use --part-ids 046112,053393 to run an exact, comma-separated regression
subset. Unknown ids are rejected so a phase baseline cannot silently omit a
requested part.
Use --phase p3, --phase p4, or --phase p6 to run a documented
strict-closed static pool. The
selector lives in phase_pools.py; its membership is regression-tested
against the committed exports rather than copied into a shell command.
The runtime foundation test suite also analyzes every committed export without building STEP, so CI verifies that the full corpus always yields one machine-readable capability result per input. Use the batch command above for the slower, resumable truth-build layer.