cdsl
This commit is contained in:
@@ -106,10 +106,17 @@ class AuthoringCompiler:
|
||||
sketch_id = f"sketch_{source_positions[feature.name]:03d}"
|
||||
sketches.append({"id": sketch_id, **self._runtime_sketch(feature.sketch.model_dump(mode="json"))})
|
||||
output["sketch_id"] = sketch_id
|
||||
if feature.intent is not None:
|
||||
# Semantic annotation only: carried through for training data,
|
||||
# never consumed by runtime geometry or validation semantics.
|
||||
output["intent"] = feature.intent.model_dump(mode="json", exclude_none=True)
|
||||
features.append(output)
|
||||
document_meta: dict[str, Any] = {"unit": "mm"}
|
||||
if doc.meta is not None:
|
||||
document_meta.update(doc.meta.model_dump(mode="json", exclude_none=True))
|
||||
runtime = {
|
||||
"schema": "cad.runtime.v1", "schema_version": "1.0.0", "kind": "part",
|
||||
"part_id": "compiled", "meta": {"unit": "mm"},
|
||||
"part_id": "compiled", "meta": document_meta,
|
||||
"bodies": [
|
||||
{"id": body_ids[body.name], "name": body.name}
|
||||
for body in doc.bodies
|
||||
|
||||
Reference in New Issue
Block a user