diff --git a/json_to_cdsl/evidence_v2_to_cdsl.py b/json_to_cdsl/evidence_v2_to_cdsl.py index 1012ad55..4efed0c8 100644 --- a/json_to_cdsl/evidence_v2_to_cdsl.py +++ b/json_to_cdsl/evidence_v2_to_cdsl.py @@ -414,7 +414,16 @@ def _analytic_profile(sketch: dict[str, Any]) -> dict[str, Any]: smaller, larger = sorted(drawable, key=lambda item: item["radius_mm"]) return {"type": "annulus", "center": larger["center"], "inner_radius_mm": smaller["radius_mm"], "outer_radius_mm": larger["radius_mm"]} if drawable and all(item["type"] == "circle" for item in drawable): - return {"type": "circles", "items": [{"center": item["center"], "radius_mm": item["radius_mm"]} for item in drawable]} + # Multiple independent circles share the "extrude every closed loop" intent; + # emit them as analytic_contours (one outer contour per circle) so the + # generic runtime profile contract accepts the record. + return { + "type": "analytic_contours", + "contours": [ + {"role": "outer", "closed": True, "segments": [item]} + for item in drawable + ], + } contours = _chain_segments(drawable) areas = [_contour_area(contour) for contour in contours]