Files
cdsl-cad/cadfs_to_cdsl
likang 738934416e feat(cadfs): 扩展重建引擎能力并固化代表性模型回归
- 扩展 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 特征链及运行时兼容性。
2026-09-08 11:47:10 +08:00
..
2026-09-02 13:51:35 +08:00
2026-09-02 13:51:35 +08:00
2026-09-02 13:51:35 +08:00
2026-09-04 11:17:36 +08:00
2026-09-02 13:51:35 +08:00
2026-09-02 13:51:35 +08:00
2026-09-02 13:51:35 +08:00
2026-09-02 13:51:35 +08:00

CADFS to CDSL

Converts the local CADFS FeatureScript RP corpus to self-contained CDSL 1.1, rebuilds runtime-eligible documents with the current CDSL engine, and compares the rebuilt B-rep with the source STEP.

PYTHONPATH=backend:. python -m cadfs_to_cdsl scan
PYTHONPATH=backend:. python -m cadfs_to_cdsl pipeline --sample-id 00000173
PYTHONPATH=backend:. python -m cadfs_to_cdsl pipeline --limit 100 --seed 0
PYTHONPATH=backend:. python -m cadfs_to_cdsl pipeline

All stages are resumable. Use --force after changing converter behavior. The original CADFS directory is read-only; generated evidence is written under cadfs_to_cdsl/output/samples/<sample_id>/.

Full corpus one-command runner

Run the full conversion, rebuild, comparison, and Markdown report with:

./cadfs_to_cdsl/run_full_rebuild.sh

The default is a forced fresh pass. Before it begins, the previous cadfs_to_cdsl/output directory is moved to cadfs_to_cdsl/output-history/<timestamp>/; it is never deleted or mixed with the new result. Use --resume to reuse the existing output without archiving it, or --compare-mode strict for strict acceptance. See ./cadfs_to_cdsl/run_full_rebuild.sh --help for worker and timeout options.

Representative regression pool

Generate the checked-in representative manifest after a full corpus conversion:

PYTHONPATH=backend:. python -m cadfs_to_cdsl regression-select

The selector deterministically covers every observed FeatureScript modeling operation, sketch entity type, lowered CDSL atomic operation, unsupported operation, and unsupported engine-capability variant. It records which atomic operations have a successful engine baseline and which are diagnostic-only; the latter are never reported as passing builds. A normal engine change has a small, executable STEP regression command:

PYTHONPATH=backend:. python -m cadfs_to_cdsl regression --tier engine --stage rebuild

The command reruns by default; use --resume only to inspect cached results. Use --tier conversion --stage convert to verify feature lowering and diagnostics, or --tier all --stage pipeline for the complete representative conversion/rebuild/compare pass. Unsupported CADFS features remain diagnostic coverage, not expected successful engine builds.