优化生成流程
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
"schema": "cdsl.engine.schema.v1",
|
||||
"schema_version": "1.3.0",
|
||||
"cdsl_json_schema_file": "cdsl_schema.json",
|
||||
"maintenance_rule": "The semantic CDSL contract is a superset of the current runtime. runtime_supported_atomic_ids and runtime_supported_profiles must stay synchronized with runtime.py EXECUTORS, sketch_solver.py SHAPE_GENERATORS, and the package-level capability tests. Legacy llm_compiler.py and llm_engine.py are not the CDSL-only runtime contract.",
|
||||
"maintenance_rule": "The CDSL-only runtime contract is limited to direct generic profiles and runtime.py EXECUTORS. Legacy macro profiles are importer compatibility syntax and must be lowered by cdsl_importer.legacy_profile_adapter before generic runtime validation.",
|
||||
"coordinate_convention": "All profile dimensions use millimetres. Two-dimensional points are [u, v] in the sketch workplane.",
|
||||
"runtime_supported_atomic_ids": ["extrude_add_blind", "extrude_add_two_sided", "extrude_cut_blind", "revolve_add", "revolve_cut", "hole_blind", "hole_countersink", "hole_counterbore", "sphere_add", "reference_plane", "reference_axis", "hole_wizard", "fillet", "chamfer", "pattern_linear", "pattern_mirror"],
|
||||
"runtime_supported_profiles": ["circle", "annulus", "circles", "circle_grid", "rectangle", "rectangle_with_circles", "rectangle_with_fillets", "obround", "polygon", "ibone", "rectangle_with_symmetric_notches", "revolve_chamfer", "revolve_chamfer_slanted", "circle_with_arc_notches", "circular_sector_slot", "circle_with_radial_tabs", "filleted_rect_side_slots", "d_shape", "partial_ring", "partial_ring_with_arc_island", "arc_chain", "radial_slot", "patterned_cutouts", "compound_patterned_cutouts", "analytic_contours", "complex_arc_shape", "unknown_shape"],
|
||||
"runtime_supported_profiles": ["circle", "polygon", "analytic_contours"],
|
||||
"feature_atomic_ids": {
|
||||
"extrude_add_blind": {"summary": "Add the closed profile by one signed extrusion distance.", "required_params": ["distance_mm"], "optional_params": ["reverse"], "requires_sketch": true},
|
||||
"extrude_add_two_sided": {"summary": "Add the closed profile with independently captured forward and reverse terminations.", "required_params": ["distance_mm", "reverse_distance_mm"], "optional_params": ["reverse", "end_condition", "reverse_end_condition"], "requires_sketch": true},
|
||||
@@ -26,202 +26,18 @@
|
||||
},
|
||||
"profiles": {
|
||||
"circle": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A single circular closed profile.",
|
||||
"required": ["radius_mm"],
|
||||
"optional": ["center"],
|
||||
"constraints": ["radius_mm > 0", "center defaults to [0, 0]"]
|
||||
},
|
||||
"annulus": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A concentric ring.",
|
||||
"required": ["inner_radius_mm", "outer_radius_mm"],
|
||||
"optional": ["center"],
|
||||
"constraints": ["0 < inner_radius_mm < outer_radius_mm"]
|
||||
},
|
||||
"circles": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A non-empty list of circles.",
|
||||
"required": ["items"],
|
||||
"item_schema": {"required": ["radius_mm"], "optional": ["center"]}
|
||||
},
|
||||
"circle_grid": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A rectangular grid of equal circles.",
|
||||
"required": ["radius_mm", "count_x", "count_y", "spacing_x_mm", "spacing_y_mm"],
|
||||
"optional": ["origin_mm", "center_mm"],
|
||||
"constraints": ["radius_mm > 0", "count_x and count_y are integers >= 1", "use origin_mm or center_mm, not both"]
|
||||
},
|
||||
"rectangle": {
|
||||
"agent_allowed": true,
|
||||
"summary": "An axis-aligned rectangle.",
|
||||
"one_of": [["center", "width_mm", "height_mm"], ["min_mm", "max_mm"]],
|
||||
"constraints": ["width_mm > 0 and height_mm > 0 when using center"]
|
||||
},
|
||||
"rectangle_with_circles": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A rectangle or filleted rectangle with optional internal circles.",
|
||||
"required": ["boundary"],
|
||||
"optional": ["circles"],
|
||||
"nested": {"boundary": "rectangle schema plus optional type=rectangle|rectangle_with_fillets and fillet_radius_mm"}
|
||||
},
|
||||
"rectangle_with_fillets": {
|
||||
"agent_allowed": true,
|
||||
"summary": "An axis-aligned rectangle with corner fillets and optional internal circles.",
|
||||
"one_of": [["center", "width_mm", "height_mm"], ["min_mm", "max_mm"]],
|
||||
"optional": ["fillet_radius_mm", "circles"],
|
||||
"constraints": ["fillet_radius_mm defaults to 0"]
|
||||
},
|
||||
"obround": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A horizontal capsule/slot.",
|
||||
"required": ["length_mm", "width_mm"],
|
||||
"optional": ["center"],
|
||||
"constraints": ["length_mm > 0", "width_mm > 0", "center defaults to [0, 0]"]
|
||||
},
|
||||
"polygon": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A closed straight-edge polygon.",
|
||||
"required": ["vertices"],
|
||||
"constraints": ["vertices contains at least three [u, v] points"]
|
||||
},
|
||||
"ibone": {
|
||||
"agent_allowed": true,
|
||||
"summary": "I-shaped lug with optional four holes.",
|
||||
"required": ["body_width_mm", "body_height_mm", "flange_width_mm", "flange_height_mm", "corner_radius_mm"],
|
||||
"optional": ["hole_radius_mm"]
|
||||
},
|
||||
"rectangle_with_symmetric_notches": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A rectangular plate with four symmetric side notches.",
|
||||
"required": ["width_mm", "height_mm", "notch"],
|
||||
"nested": {"notch": {"required": ["y_start", "y_end", "depth_mm"], "optional": ["inner_radius_mm", "corner_radius_mm"]}}
|
||||
},
|
||||
"revolve_chamfer": {
|
||||
"agent_allowed": true,
|
||||
"summary": "Five-edge trapezoid profile for a revolve cut.",
|
||||
"required": ["axis_height_mm", "top_width_mm", "bottom_width_mm"],
|
||||
"optional": ["wall_inset_mm", "step_inset_mm", "on_axis_side"],
|
||||
"constraints": ["on_axis_side is left or right"]
|
||||
},
|
||||
"revolve_chamfer_slanted": {
|
||||
"agent_allowed": true,
|
||||
"summary": "Five-edge slanted profile for a revolve cut.",
|
||||
"required": ["axis_height_mm", "top_width_mm", "wall_height_mm", "wall_width_mm"],
|
||||
"optional": ["wall_inset_mm", "on_axis_side"],
|
||||
"constraints": ["on_axis_side is left or right"]
|
||||
},
|
||||
"circle_with_arc_notches": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A circular boundary with arc-shaped notches.",
|
||||
"required": ["outer_radius_mm", "notch_radius_mm"],
|
||||
"optional": ["notch_angles_deg", "circles"],
|
||||
"constraints": ["notch_angles_deg defaults to [0, 90, 180, 270]"]
|
||||
},
|
||||
"circular_sector_slot": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A circular-sector boundary with a central rectangular slot.",
|
||||
"required": ["arc_radius_mm", "slot_half_width_mm", "chord_half_mm"],
|
||||
"optional": ["circles"]
|
||||
},
|
||||
"circle_with_radial_tabs": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A circle with two mirrored radial tabs.",
|
||||
"required": ["outer_radius_mm"],
|
||||
"optional": ["tab_u_half_mm", "tab_v_offset_mm", "circles"]
|
||||
},
|
||||
"filleted_rect_side_slots": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A filleted rectangle with one semicircular slot at each side centre.",
|
||||
"required": ["half_width_mm", "half_height_mm", "corner_radius_mm"],
|
||||
"optional": ["slot_radius_mm", "circles"]
|
||||
},
|
||||
"d_shape": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A D-shaped boundary made from one chord and one arc.",
|
||||
"required": ["radius_mm"],
|
||||
"optional": ["chord_sign", "chord_x_mm", "circles"],
|
||||
"constraints": ["chord_sign is left or right"]
|
||||
},
|
||||
"partial_ring": {
|
||||
"agent_allowed": true,
|
||||
"summary": "An annular sector.",
|
||||
"required": ["inner_radius_mm", "outer_radius_mm"],
|
||||
"optional": ["half_angle_deg", "circles"],
|
||||
"constraints": ["0 < inner_radius_mm < outer_radius_mm"]
|
||||
},
|
||||
"partial_ring_with_arc_island": {
|
||||
"agent_allowed": true,
|
||||
"summary": "One or more annular sectors with an arc island.",
|
||||
"required": ["inner_radius_mm", "outer_radius_mm", "island_radius_mm"],
|
||||
"optional": ["half_angle_deg", "island_gap_mm", "center_angles_deg", "replicas"],
|
||||
"nested": {"replicas": {"required": ["center_angle_deg"]}}
|
||||
},
|
||||
"arc_chain": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A closed chain of two or more arcs, commonly used for revolve sections.",
|
||||
"required": ["arcs"],
|
||||
"optional": ["circles"],
|
||||
"item_schema": {"required": ["radius_mm", "start_angle_deg", "end_angle_deg"], "optional": ["center"]},
|
||||
"constraints": ["arcs contains at least two endpoint-connected arcs"]
|
||||
},
|
||||
"radial_slot": {
|
||||
"agent_allowed": true,
|
||||
"summary": "A rounded annular sector slot.",
|
||||
"required": ["inner_radius_mm", "outer_radius_mm", "start_angle_deg", "end_angle_deg"],
|
||||
"optional": ["circles"],
|
||||
"constraints": ["0 < inner_radius_mm < outer_radius_mm"]
|
||||
},
|
||||
"patterned_cutouts": {
|
||||
"agent_allowed": true,
|
||||
"summary": "One procedural cutout motif repeated by one procedural layout.",
|
||||
"required": ["motif", "layout"],
|
||||
"nested": {"motif": "See motif_types", "layout": "See layout_types"}
|
||||
},
|
||||
"compound_patterned_cutouts": {
|
||||
"agent_allowed": true,
|
||||
"summary": "Multiple procedural motif/layout pairs merged into one cutout sketch.",
|
||||
"required": ["patterns"],
|
||||
"nested": {"patterns": "Non-empty list of {motif, layout}; see patterned_cutouts."}
|
||||
},
|
||||
"complex_arc_shape": {
|
||||
"agent_allowed": false,
|
||||
"summary": "Legacy compiler-context fallback only. Never generate it."
|
||||
},
|
||||
"analytic_contours": {
|
||||
"agent_allowed": false,
|
||||
"summary": "Exact analytic line, arc and circle contours emitted by the Evidence v2 converter. The runtime resolves them into closed regions without compiler_context; B-spline currently produces an explicit unsupported diagnostic."
|
||||
},
|
||||
"unknown_shape": {
|
||||
"agent_allowed": false,
|
||||
"summary": "Legacy compiler-context fallback only. Never generate it."
|
||||
"summary": "Closed direct line, arc and circle contours. B-splines are unsupported."
|
||||
}
|
||||
},
|
||||
"motif_types": {
|
||||
"circle": ["radius_mm"],
|
||||
"square": ["width_mm"],
|
||||
"rectangle": ["width_mm", "height_mm"],
|
||||
"obround": ["length_mm", "width_mm"],
|
||||
"cross": ["size_mm", "arm_width_mm"],
|
||||
"d_shape_polygon": ["stem_length_mm", "nose_depth_mm", "half_height_mm"],
|
||||
"regular_hexagon": ["radius_mm"],
|
||||
"skew_hexagon": ["nominal_radius_mm"],
|
||||
"triangle": ["radius_mm"],
|
||||
"teardrop_polygon": ["width_mm", "height_mm"],
|
||||
"trapezoid": ["bottom_width_mm", "top_width_mm", "height_mm"],
|
||||
"annular_sector_polygon": ["inner_radius_mm", "outer_radius_mm", "half_angle_deg"]
|
||||
},
|
||||
"layout_types": {
|
||||
"ring": ["radius_mm", "count"],
|
||||
"angular": ["count"],
|
||||
"concentric_rings": ["rings"],
|
||||
"disc_grid": ["count_x", "count_y", "spacing_x_mm", "spacing_y_mm"],
|
||||
"open_arc": ["radius_mm", "count", "start_angle_deg", "end_angle_deg"],
|
||||
"spiral": ["count", "start_radius_mm", "radius_step_mm", "angle_step_deg"],
|
||||
"cross_lines": ["count_per_axis", "spacing_mm"],
|
||||
"x_field": ["levels", "spacing_mm"],
|
||||
"twin_strips": ["x_offset_mm", "count_y", "y_start_mm", "y_end_mm"],
|
||||
"corner_clusters": ["levels_mm"],
|
||||
"diamond_field": ["manhattan_radius", "spacing_mm"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user