This commit is contained in:
2026-08-21 11:13:18 +08:00
parent beba8744b4
commit 41ed846c23
2028 changed files with 1327194 additions and 293 deletions
+27
View File
@@ -14,3 +14,30 @@ Conversion responsibilities:
The converter must not hide missing geometry behind an external context file
when producing a training-ready CDSL artifact.
## Evidence v2 batch converter
`evidence_v2_to_cdsl.py` converts the newer
`solidworks.cad_evidence.v2` extraction format into semantic CDSL v1.1. It
does not modify the current rebuild engine: features without a runtime
implementation are emitted with `execution_status: "deferred"` instead.
```bash
PYTHONPATH=backend/engine python json_to_cdsl/evidence_v2_to_cdsl.py \
/path/to/evidence_v2 \
--truth-dir /path/to/evidence_v2/truth \
--out json_to_cdsl/output \
--workers 1
```
For every `*.solidworks_evidence_v2.json` input it writes:
- `<part_id>.cdsl.json`: self-contained semantic CDSL in millimetres;
- `<part_id>.diagnostic.json`: source blockers, deferred features, optional
`inferred_from_step` selectors, semantic validation, and STEP-versus-source
bounding-box/volume/area/topology metrics;
- `manifest.json`: batch-level counts and paths.
The optional STEP directory is used only to infer a host face when exactly one
candidate is compatible with a Hole Wizard's captured locations. Ambiguous
geometry stays in `unresolved`; the converter never invents a selector.