{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://simplecad.local/schemas/planetary-joint-sop-v2.schema.json", "title": "SimpleCAD planetary-joint executable SOP V2 (NW type support)", "type": "object", "additionalProperties": false, "required": [ "schema", "design_id", "units", "axis_convention", "assembly_layout", "definitions", "instances", "expected_definition_counts", "assembly_root_instance_id", "assembly_relations", "transmission", "public_connectors", "interference_contract", "verification", "runtime_policy" ], "properties": { "schema": { "const": "simplecad.std.planetary_joint.sop.v2" }, "design_id": { "type": "string", "minLength": 1 }, "units": { "const": "millimetre_degree" }, "axis_convention": { "type": "object", "additionalProperties": false, "required": [ "main_axis", "radial_plane", "right_handed" ], "properties": { "main_axis": { "enum": [ "x", "y", "z" ] }, "radial_plane": { "enum": [ "xy", "yz", "zx" ] }, "right_handed": { "const": true } } }, "assembly_layout": { "type": "object", "additionalProperties": false, "required": [ "method", "calibration_role", "rules" ], "properties": { "method": { "const": "semantic_axial_orbit" }, "calibration_role": { "const": "offline_dimensions_only" }, "rules": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/layout_rule" } } } }, "definitions": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/definition" } }, "instances": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/instance" } }, "expected_definition_counts": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": [ "definition_id", "count" ], "properties": { "definition_id": { "type": "string", "minLength": 1 }, "count": { "type": "integer", "minimum": 1 } } } }, "assembly_root_instance_id": { "type": "string", "minLength": 1 }, "assembly_relations": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/relation" } }, "transmission": { "$ref": "#/$defs/transmission" }, "public_connectors": { "type": "array", "minItems": 3, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "source" ], "properties": { "id": { "type": "string", "minLength": 1 }, "source": { "$ref": "#/$defs/endpoint" } } } }, "interference_contract": { "type": "object", "additionalProperties": false, "required": [ "policy", "volume_tolerance_mm3", "motion_samples_degrees", "designed_interference_fits" ], "properties": { "policy": { "const": "no_unlisted_positive_volume" }, "volume_tolerance_mm3": { "type": "number", "minimum": 0 }, "motion_samples_degrees": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "type": "number" } }, "designed_interference_fits": { "type": "array", "items": { "$ref": "#/$defs/interference_fit" } } } }, "verification": { "type": "object", "additionalProperties": false, "required": [ "default_geometry", "assembly", "motion", "parameter_sweeps" ], "properties": { "default_geometry": { "enum": [ "strict_brep", "numeric_per_solid", "interface_only" ] }, "assembly": { "const": "connector_residuals_and_collision" }, "motion": { "const": "willis_residual_and_interference_sweep" }, "parameter_sweeps": { "type": "integer", "minimum": 2 } } }, "runtime_policy": { "type": "object", "additionalProperties": false, "required": [ "teacher_geometry_allowed", "absolute_matrix_replay_allowed", "source_cad_required", "checksum_locked_cots_step_allowed" ], "properties": { "teacher_geometry_allowed": { "const": false }, "absolute_matrix_replay_allowed": { "const": false }, "source_cad_required": { "const": false }, "checksum_locked_cots_step_allowed": { "const": true } } } }, "$defs": { "layout_rule": { "type": "object", "additionalProperties": false, "required": [ "selector", "mode" ], "properties": { "selector": { "type": "string", "pattern": "^(instance|definition):[^:]+$" }, "mode": { "enum": [ "root", "coaxial", "orbit" ] }, "axial_mm": { "type": "number" }, "radial_mm": { "type": "number", "minimum": 0 }, "radial_angle_degrees": { "type": "number" }, "orbit_phase_degrees": { "type": "number" }, "local_axis": { "enum": [ "x", "y", "z" ] }, "axis_direction": { "enum": [ -1, 1 ] }, "clock_degrees": { "type": "number" }, "clock_step_degrees": { "type": "number" } }, "allOf": [ { "if": { "properties": { "mode": { "const": "root" } } }, "then": { "required": [ "selector", "mode" ] }, "else": { "required": [ "axial_mm", "local_axis", "axis_direction", "clock_degrees" ] } }, { "if": { "properties": { "mode": { "const": "orbit" } } }, "then": { "required": [ "orbit_phase_degrees", "clock_step_degrees" ] } } ] }, "connector": { "type": "object", "additionalProperties": false, "required": [ "id", "kind" ], "properties": { "id": { "type": "string", "minLength": 1 }, "kind": { "enum": [ "frame", "revolute_axis", "mount", "gear_axis", "bearing_seat", "shaft_hub" ] } } }, "definition": { "type": "object", "additionalProperties": false, "required": [ "id", "family", "generator", "source_mode", "maturity", "connectors" ], "properties": { "id": { "type": "string", "minLength": 1 }, "family": { "type": "string", "minLength": 1 }, "generator": { "type": "string", "pattern": "^simplecadapi\\.std\\." }, "source_mode": { "enum": [ "formula_std", "cots_step" ] }, "maturity": { "enum": [ "formula_verified", "formula_provisional", "cots_step_verified" ] }, "cots_asset": { "$ref": "#/$defs/cots_asset" }, "connectors": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/connector" } } }, "allOf": [ { "if": { "properties": { "source_mode": { "const": "cots_step" } } }, "then": { "required": [ "cots_asset" ], "properties": { "maturity": { "const": "cots_step_verified" } } }, "else": { "not": { "required": [ "cots_asset" ] } } } ] }, "cots_asset": { "type": "object", "additionalProperties": false, "required": [ "path", "sha256", "solid_count", "geometry_editability" ], "properties": { "path": { "type": "string", "pattern": "^[^/].*\\.step$" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "solid_count": { "type": "integer", "minimum": 1 }, "geometry_editability": { "const": "immutable" } } }, "instance": { "type": "object", "additionalProperties": false, "required": [ "id", "definition_id" ], "properties": { "id": { "type": "string", "minLength": 1 }, "definition_id": { "type": "string", "minLength": 1 }, "pattern_index": { "type": "integer", "minimum": 0 } } }, "endpoint": { "type": "object", "additionalProperties": false, "required": [ "instance_id", "connector_id" ], "properties": { "instance_id": { "type": "string", "minLength": 1 }, "connector_id": { "type": "string", "minLength": 1 } } }, "relation": { "type": "object", "additionalProperties": false, "required": [ "id", "type", "a", "b" ], "properties": { "id": { "type": "string", "minLength": 1 }, "type": { "enum": [ "fixed", "revolute", "bearing_support", "shaft_hub", "coaxial" ] }, "a": { "$ref": "#/$defs/endpoint" }, "b": { "$ref": "#/$defs/endpoint" }, "motion_role": { "enum": [ "input", "output", "planet_spin", "free" ] }, "phase_offset_degrees": { "type": "number" } } }, "interference_fit": { "type": "object", "additionalProperties": false, "required": [ "id", "a", "b", "type", "target_volume_mm3", "volume_tolerance_mm3", "evidence" ], "properties": { "id": { "type": "string", "minLength": 1 }, "a": { "type": "string", "minLength": 1 }, "b": { "type": "string", "minLength": 1 }, "type": { "const": "source_matched_press_fit" }, "target_volume_mm3": { "type": "number", "exclusiveMinimum": 0 }, "volume_tolerance_mm3": { "type": "number", "minimum": 0 }, "evidence": { "type": "string", "minLength": 1 } } }, "mesh": { "type": "object", "additionalProperties": false, "required": [ "id", "type", "a", "b", "backlash_mm" ], "properties": { "id": { "type": "string", "minLength": 1 }, "type": { "enum": [ "external", "internal" ] }, "a": { "type": "string", "minLength": 1 }, "b": { "type": "string", "minLength": 1 }, "backlash_mm": { "type": "number", "minimum": 0 } } }, "transmission": { "type": "object", "additionalProperties": false, "required": [ "type", "module_mm", "pressure_angle_deg", "teeth", "planet_count", "center_radius_mm", "center_tolerance_mm", "fixed_member", "input_member", "output_member", "fixed_ring_ratio", "ratio_tolerance", "meshes" ], "properties": { "type": { "enum": [ "simple_planetary", "nw_planetary" ] }, "module_mm": { "type": "number", "exclusiveMinimum": 0 }, "pressure_angle_deg": { "type": "number", "exclusiveMinimum": 0, "exclusiveMaximum": 90 }, "teeth": { "type": "object", "additionalProperties": false, "required": [ "sun", "planet", "ring" ], "properties": { "sun": { "type": "integer", "minimum": 6 }, "planet": { "type": "integer", "minimum": 6 }, "planet_inner": { "type": "integer", "minimum": 6 }, "ring": { "type": "integer", "minimum": 12 } } }, "planet_count": { "type": "integer", "minimum": 2 }, "center_radius_mm": { "type": "number", "exclusiveMinimum": 0 }, "center_tolerance_mm": { "type": "number", "minimum": 0 }, "fixed_member": { "enum": [ "ring_gear", "carrier", "sun_gear" ] }, "input_member": { "enum": [ "sun_gear", "carrier", "ring_gear" ] }, "output_member": { "enum": [ "carrier", "sun_gear", "ring_gear" ] }, "fixed_ring_ratio": { "type": "number", "exclusiveMinimum": 1 }, "ratio_tolerance": { "type": "number", "minimum": 0 }, "meshes": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/mesh" } } }, "allOf": [ { "if": { "properties": { "type": { "const": "nw_planetary" } } }, "then": { "required": [ "teeth" ], "properties": { "teeth": { "required": [ "sun", "planet", "planet_inner", "ring" ] } } } } ] } } }