feat(cadfs): 补齐核心建模能力并建立代表性回归
- 新增 loft、双向切除、through-all/up-to-next 等 CADFS lowering 与 engine 支持 - 支持多种 reference plane、B-spline profile 和 circular pattern replay - 保留 transform 历史,并烘焙安全的单源平移/旋转变换 - 改进 selector 绑定、拓扑快照和 pattern 变换处理 - 建立 17 个代表样本的转换、重建与比较回归工具链 - 补充 schema、author guidance、运行时和几何回归测试
This commit is contained in:
@@ -103,7 +103,12 @@ def _isolated(target: Any, args: tuple[str, ...], result_path: Path, timeout_sec
|
||||
def rebuild_one(sample: Sample, output: Path, *, force: bool = False, timeout_seconds: float = 30.0) -> dict[str, Any]:
|
||||
directory = _sample_dir(output, sample.sample_id); status_path = directory / "status.json"
|
||||
status = read_json(status_path) if status_path.exists() else convert_one(sample, output, force=force)
|
||||
if status.get("conversion_status") != "converted_complete": return status
|
||||
# A partial conversion may still retain a self-contained, semantically
|
||||
# executable CDSL prefix. That prefix is valuable engine evidence and
|
||||
# must be rebuilt instead of being hidden behind the conversion label.
|
||||
# ``rebuild_candidate`` keeps the two outcomes distinct by reporting a
|
||||
# runtime-ineligible candidate when no executable body can be produced.
|
||||
if not (directory / "candidate.cdsl.json").exists(): return status
|
||||
rebuild_path = directory / "rebuild.json"; step_path = directory / "rebuild.step"
|
||||
if not force and rebuild_path.exists() and status.get("rebuild_status"):
|
||||
if status.get("rebuild_status") != "rebuilt" or step_path.exists(): return status
|
||||
|
||||
Reference in New Issue
Block a user