[ { "name": "abs", "summary": "Compute the absolute value of a number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "myAngle = -120\n\nsketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([8, 0], %)\n |> angledLine({ angle: abs(myAngle), length: 5 }, %)\n |> line([-5, 0], %)\n |> angledLine({ angle: myAngle, length: 5 }, %)\n |> close(%)\n\nbaseExtrusion = extrude(5, sketch001)" ] }, { "name": "acos", "summary": "Compute the arccosine of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: toDegrees(acos(0.5)),\n length: 10\n }, %)\n |> line([5, 0], %)\n |> lineTo([12, 0], %)\n |> close(%)\n\nextrude001 = extrude(5, sketch001)" ] }, { "name": "angleToMatchLengthX", "summary": "Compute the angle (in degrees) in o", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "to", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([2, 5], %, $seg01)\n |> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %)\n |> close(%)\n\nextrusion = extrude(5, sketch001)" ] }, { "name": "angleToMatchLengthY", "summary": "Returns the angle to match the given length for y.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "to", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([1, 2], %, $seg01)\n |> angledLine({\n angle: angleToMatchLengthY(seg01, 15, %),\n length: 5\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nextrusion = extrude(5, sketch001)" ] }, { "name": "angledLine", "summary": "Draw a line segment relative to the current origin using the polar", "description": "measure of some angle and distance.", "tags": [], "args": [ { "name": "data", "type": "AngledLineData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineData", "description": "Data to draw an angled line.", "anyOf": [ { "description": "An angle and length with explicitly named parameters", "type": "object", "required": [ "angle", "length" ], "properties": { "angle": { "description": "The angle of the line (in degrees).", "type": "number", "format": "double" }, "length": { "description": "The length of the line.", "type": "number", "format": "double" } } }, { "description": "An angle and length given as a pair", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } ] }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> yLineTo(15, %)\n |> angledLine({ angle: 30, length: 15 }, %)\n |> line([8, -10], %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "angledLineOfXLength", "summary": "Create a line segment from the current 2-dimensional sketch origin", "description": "along some angle (in degrees) for some relative length in the 'x' dimension.", "tags": [], "args": [ { "name": "data", "type": "AngledLineData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineData", "description": "Data to draw an angled line.", "anyOf": [ { "description": "An angle and length with explicitly named parameters", "type": "object", "required": [ "angle", "length" ], "properties": { "angle": { "description": "The angle of the line (in degrees).", "type": "number", "format": "double" }, "length": { "description": "The length of the line.", "type": "number", "format": "double" } } }, { "description": "An angle and length given as a pair", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } ] }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineOfXLength({ angle: 45, length: 10 }, %, $edge1)\n |> angledLineOfXLength({ angle: -15, length: 20 }, %, $edge2)\n |> line([0, -5], %)\n |> close(%, $edge3)\n\nextrusion = extrude(10, sketch001)" ] }, { "name": "angledLineOfYLength", "summary": "Create a line segment from the current 2-dimensional sketch origin", "description": "along some angle (in degrees) for some relative length in the 'y' dimension.", "tags": [], "args": [ { "name": "data", "type": "AngledLineData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineData", "description": "Data to draw an angled line.", "anyOf": [ { "description": "An angle and length with explicitly named parameters", "type": "object", "required": [ "angle", "length" ], "properties": { "angle": { "description": "The angle of the line (in degrees).", "type": "number", "format": "double" }, "length": { "description": "The length of the line.", "type": "number", "format": "double" } } }, { "description": "An angle and length given as a pair", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } ] }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLineOfYLength({ angle: 45, length: 10 }, %)\n |> line([0, 10], %)\n |> angledLineOfYLength({ angle: 135, length: 10 }, %)\n |> line([-10, 0], %)\n |> line([0, -30], %)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "angledLineThatIntersects", "summary": "Draw an angled line from the current origin, constructing a line segment", "description": "such that the newly created line intersects the desired target line segment.", "tags": [], "args": [ { "name": "data", "type": "AngledLineThatIntersectsData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineThatIntersectsData", "description": "Data for drawing an angled line that intersects with a given line.", "type": "object", "required": [ "angle", "intersectTag" ], "properties": { "angle": { "description": "The angle of the line.", "type": "number", "format": "double" }, "intersectTag": { "description": "The tag of the line to intersect with.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] }, "offset": { "description": "The offset from the intersecting line.", "type": "number", "format": "double", "nullable": true } }, "definitions": { "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> lineTo([5, 10], %)\n |> lineTo([-10, 10], %, $lineToIntersect)\n |> lineTo([0, 20], %)\n |> angledLineThatIntersects({\n angle: 80,\n intersectTag: lineToIntersect,\n offset: 10\n }, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "angledLineToX", "summary": "Create a line segment from the current 2-dimensional sketch origin", "description": "along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.", "tags": [], "args": [ { "name": "data", "type": "AngledLineToData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineToData", "description": "Data to draw an angled line to a point.", "type": "object", "required": [ "angle", "to" ], "properties": { "angle": { "description": "The angle of the line.", "type": "number", "format": "double" }, "to": { "description": "The point to draw to.", "type": "number", "format": "double" } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineToX({ angle: 30, to: 10 }, %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "angledLineToY", "summary": "Create a line segment from the current 2-dimensional sketch origin", "description": "along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.", "tags": [], "args": [ { "name": "data", "type": "AngledLineToData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "AngledLineToData", "description": "Data to draw an angled line to a point.", "type": "object", "required": [ "angle", "to" ], "properties": { "angle": { "description": "The angle of the line.", "type": "number", "format": "double" }, "to": { "description": "The point to draw to.", "type": "number", "format": "double" } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineToY({ angle: 60, to: 20 }, %)\n |> line([-20, 0], %)\n |> angledLineToY({ angle: 70, to: 10 }, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "arc", "summary": "Draw a curved line segment along an imaginary circle.", "description": "The arc is constructed such that the current position of the sketch is placed along an imaginary circle of the specified radius, at angleStart degrees. The resulting arc is the segment of the imaginary circle from that origin point to angleEnd, radius away from the center of the imaginary circle.\n\nUnless this makes a lot of sense and feels like what you're looking for to construct your shape, you're likely looking for tangentialArc.", "tags": [], "args": [ { "name": "data", "type": "ArcData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "ArcData", "description": "Data to draw an arc.", "anyOf": [ { "description": "Angles and radius with an optional tag.", "type": "object", "required": [ "angleEnd", "angleStart", "radius" ], "properties": { "angleStart": { "description": "The start angle.", "type": "number", "format": "double", "maximum": 360.0, "minimum": -360.0 }, "angleEnd": { "description": "The end angle.", "type": "number", "format": "double", "maximum": 360.0, "minimum": -360.0 }, "radius": { "description": "The radius.", "type": "number", "format": "double" } } }, { "description": "Center, to and radius with an optional tag.", "type": "object", "required": [ "center", "radius", "to" ], "properties": { "center": { "description": "The center.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "The radius.", "type": "number", "format": "double" } } } ] }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> arc({\n angleStart: 0,\n angleEnd: 280,\n radius: 16\n }, %)\n |> close(%)" ] }, { "name": "asin", "summary": "Compute the arcsine of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: toDegrees(asin(0.5)),\n length: 20\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nextrude001 = extrude(5, sketch001)" ] }, { "name": "assert", "summary": "Check a value at runtime, and raise an error if the argument provided", "description": "is false.", "tags": [], "args": [ { "name": "data", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Boolean", "type": "boolean" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "myVar = true\nassert(myVar, \"should always be true\")" ] }, { "name": "assertEqual", "summary": "Check that a numerical value equals another at runtime,", "description": "otherwise raise an error.", "tags": [], "args": [ { "name": "left", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "right", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "epsilon", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "n = 1.0285\no = 1.0286\nassertEqual(n, o, 0.01, \"n is within the given tolerance for o\")" ] }, { "name": "assertGreaterThan", "summary": "Check that a numerical value is greater than another at runtime,", "description": "otherwise raise an error.", "tags": [], "args": [ { "name": "left", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "right", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "assertGreaterThan(2, 1, \"2 is greater than 1\")" ] }, { "name": "assertGreaterThanOrEq", "summary": "Check that a numerical value is greater than or equal to another at runtime,", "description": "otherwise raise an error.", "tags": [], "args": [ { "name": "left", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "right", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "assertGreaterThanOrEq(2, 1, \"2 is greater than 1\")\nassertGreaterThanOrEq(1, 1, \"1 is equal to 1\")" ] }, { "name": "assertLessThan", "summary": "Check that a numerical value is less than to another at runtime,", "description": "otherwise raise an error.", "tags": [], "args": [ { "name": "left", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "right", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "assertLessThan(1, 2, \"1 is less than 2\")" ] }, { "name": "assertLessThanOrEq", "summary": "Check that a numerical value is less than or equal to another at runtime,", "description": "otherwise raise an error.", "tags": [], "args": [ { "name": "left", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "right", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "message", "type": "string", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true } ], "returnValue": { "name": "", "type": "()", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Null", "type": "null" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "assertLessThanOrEq(1, 2, \"1 is less than 2\")\nassertLessThanOrEq(1, 1, \"1 is equal to 1\")" ] }, { "name": "atan", "summary": "Compute the arctangent of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: toDegrees(atan(1.25)),\n length: 20\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nextrude001 = extrude(5, sketch001)" ] }, { "name": "bezierCurve", "summary": "Draw a smooth, continuous, curved line segment from the current origin to", "description": "the desired (x, y), using a number of control points to shape the curve's shape.", "tags": [], "args": [ { "name": "data", "type": "BezierData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "BezierData", "description": "Data to draw a bezier curve.", "type": "object", "required": [ "control1", "control2", "to" ], "properties": { "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "control1": { "description": "The first control point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "control2": { "description": "The second control point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %)\n |> bezierCurve({\n to: [10, 10],\n control1: [5, 0],\n control2: [5, 10]\n }, %)\n |> lineTo([10, 0], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "ceil", "summary": "Compute the smallest integer greater than or equal to a number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> lineTo([12, 10], %)\n |> line([ceil(7.02986), 0], %)\n |> yLineTo(0, %)\n |> close(%)\n\nextrude001 = extrude(5, sketch001)" ] }, { "name": "chamfer", "summary": "Cut a straight transitional edge along a tagged path.", "description": "Chamfer is similar in function and use to a fillet, except a fillet will blend the transition along an edge, rather than cut a sharp, straight transitional edge.", "tags": [], "args": [ { "name": "data", "type": "ChamferData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "ChamferData", "description": "Data for chamfers.", "type": "object", "required": [ "length", "tags" ], "properties": { "length": { "description": "The length of the chamfer.", "type": "number", "format": "double" }, "tags": { "description": "The tags of the paths you want to chamfer.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeReference" } } }, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": false } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Chamfer a mounting plate.\nwidth = 20\nlength = 10\nthickness = 1\nchamferLength = 2\n\nmountingPlateSketch = startSketchOn(\"XY\")\n |> startProfileAt([-width / 2, -length / 2], %)\n |> lineTo([width / 2, -length / 2], %, $edge1)\n |> lineTo([width / 2, length / 2], %, $edge2)\n |> lineTo([-width / 2, length / 2], %, $edge3)\n |> close(%, $edge4)\n\nmountingPlate = extrude(thickness, mountingPlateSketch)\n |> chamfer({\n length: chamferLength,\n tags: [\n getNextAdjacentEdge(edge1),\n getNextAdjacentEdge(edge2),\n getNextAdjacentEdge(edge3),\n getNextAdjacentEdge(edge4)\n ]\n }, %)", "// Sketch on the face of a chamfer.\nfn cube = (pos, scale) => {\n sg = startSketchOn('XY')\n |> startProfileAt(pos, %)\n |> line([0, scale], %)\n |> line([scale, 0], %)\n |> line([0, -scale], %)\n\n return sg\n}\n\npart001 = cube([0, 0], 20)\n |> close(%, $line1)\n |> extrude(20, %)\n |> chamfer({\n length: 10,\n tags: [getOppositeEdge(line1)]\n }, %, $chamfer1) // We tag the chamfer to reference it later.\n\nsketch001 = startSketchOn(part001, chamfer1)\n |> startProfileAt([10, 10], %)\n |> line([2, 0], %)\n |> line([0, 2], %)\n |> line([-2, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n |> extrude(10, %)" ] }, { "name": "circle", "summary": "Construct a 2-dimensional circle, of the specified radius, centered at", "description": "the provided (x, y) origin point.", "tags": [], "args": [ { "name": "data", "type": "CircleData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "CircleData", "description": "Data for drawing an circle", "type": "object", "required": [ "center", "radius" ], "properties": { "center": { "description": "The center of the circle.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "The circle radius", "type": "number", "format": "double" } } }, "required": true }, { "name": "sketch_surface_or_group", "type": "SketchOrSurface", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchOrSurface", "description": "A sketch surface or a sketch.", "anyOf": [ { "$ref": "#/components/schemas/SketchSurface" }, { "$ref": "#/components/schemas/Sketch" } ], "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"-XZ\")\n |> circle({ center: [0, 0], radius: 10 }, %)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([-15, 0], %)\n |> line([30, 0], %)\n |> line([0, 30], %)\n |> line([-30, 0], %)\n |> close(%)\n |> hole(circle({ center: [0, 15], radius: 5 }, %), %)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "close", "summary": "Construct a line segment from the current origin back to the profile's", "description": "origin, ensuring the resulting 2-dimensional sketch is not open-ended.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([10, 0], %)\n |> close(%)\n |> extrude(10, %)", "exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "cm", "summary": "Centimeters conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to centimeters.\n\nFor example, if the current project uses inches, this function will return `0.393701`. If the current project uses millimeters, this function will return `10`. If the current project uses centimeters, this function will return `1`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * cm()` is more readable that your intent is \"I want 10 centimeters\" than `10 * 10`, if the project settings are in millimeters.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * cm()" ] }, { "name": "cos", "summary": "Compute the cosine of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 30,\n length: 3 / cos(toRadians(30))\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "e", "summary": "Return the value of Euler’s number `e`.", "description": "", "tags": [ "math" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 30, length: 2 * e() ^ 2 }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "extrude", "summary": "Extend a 2-dimensional sketch through a third dimension in order to", "description": "create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.", "tags": [], "args": [ { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "sketch_set", "type": "SketchSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSet", "description": "A sketch or a group of sketches.", "oneOf": [ { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "sketch" ] }, "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketches" ] } } } ], "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "example = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> arc({\n angleStart: 120,\n angleEnd: 0,\n radius: 5\n }, %)\n |> line([5, 0], %)\n |> line([0, 10], %)\n |> bezierCurve({\n control1: [-10, 0],\n control2: [2, 10],\n to: [-5, 10]\n }, %)\n |> line([-5, -2], %)\n |> close(%)\n |> extrude(10, %)", "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([-10, 0], %)\n |> arc({\n angleStart: 120,\n angleEnd: -60,\n radius: 5\n }, %)\n |> line([10, 0], %)\n |> line([5, 0], %)\n |> bezierCurve({\n control1: [-3, 0],\n control2: [2, 10],\n to: [-5, 10]\n }, %)\n |> line([-4, 10], %)\n |> line([-5, -2], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "fillet", "summary": "Blend a transitional edge along a tagged path, smoothing the sharp edge.", "description": "Fillet is similar in function and use to a chamfer, except a chamfer will cut a sharp transition along an edge while fillet will smoothly blend the transition.", "tags": [], "args": [ { "name": "data", "type": "FilletData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FilletData", "description": "Data for fillets.", "type": "object", "required": [ "radius", "tags" ], "properties": { "radius": { "description": "The radius of the fillet.", "type": "number", "format": "double" }, "tags": { "description": "The tags of the paths you want to fillet.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeReference" } }, "tolerance": { "description": "The tolerance for the fillet.", "default": null, "type": "number", "format": "double", "nullable": true } }, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": false } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "width = 20\nlength = 10\nthickness = 1\nfilletRadius = 2\n\nmountingPlateSketch = startSketchOn(\"XY\")\n |> startProfileAt([-width / 2, -length / 2], %)\n |> lineTo([width / 2, -length / 2], %, $edge1)\n |> lineTo([width / 2, length / 2], %, $edge2)\n |> lineTo([-width / 2, length / 2], %, $edge3)\n |> close(%, $edge4)\n\nmountingPlate = extrude(thickness, mountingPlateSketch)\n |> fillet({\n radius: filletRadius,\n tags: [\n getNextAdjacentEdge(edge1),\n getNextAdjacentEdge(edge2),\n getNextAdjacentEdge(edge3),\n getNextAdjacentEdge(edge4)\n ]\n }, %)", "width = 20\nlength = 10\nthickness = 1\nfilletRadius = 1\n\nmountingPlateSketch = startSketchOn(\"XY\")\n |> startProfileAt([-width / 2, -length / 2], %)\n |> lineTo([width / 2, -length / 2], %, $edge1)\n |> lineTo([width / 2, length / 2], %, $edge2)\n |> lineTo([-width / 2, length / 2], %, $edge3)\n |> close(%, $edge4)\n\nmountingPlate = extrude(thickness, mountingPlateSketch)\n |> fillet({\n radius: filletRadius,\n tolerance: 0.000001,\n tags: [\n getNextAdjacentEdge(edge1),\n getNextAdjacentEdge(edge2),\n getNextAdjacentEdge(edge3),\n getNextAdjacentEdge(edge4)\n ]\n }, %)" ] }, { "name": "floor", "summary": "Compute the largest integer less than or equal to a number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> lineTo([12, 10], %)\n |> line([floor(7.02986), 0], %)\n |> yLineTo(0, %)\n |> close(%)\n\nextrude001 = extrude(5, sketch001)" ] }, { "name": "ft", "summary": "Feet conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to feet.\n\nFor example, if the current project uses inches, this function will return `12`. If the current project uses millimeters, this function will return `304.8`. If the current project uses feet, this function will return `1`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * ft()` is more readable that your intent is \"I want 10 feet\" than `10 * 304.8`, if the project settings are in millimeters.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * ft()" ] }, { "name": "getNextAdjacentEdge", "summary": "Get the next adjacent edge to the edge given.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "Uuid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Uuid", "type": "string", "format": "uuid" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)\n |> close(%)\n\nexample = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [getNextAdjacentEdge(referenceEdge)]\n }, %)" ] }, { "name": "getOppositeEdge", "summary": "Get the opposite edge to the edge given.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "Uuid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Uuid", "type": "string", "format": "uuid" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)\n |> close(%)\n\nexample = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [getOppositeEdge(referenceEdge)]\n }, %)" ] }, { "name": "getPreviousAdjacentEdge", "summary": "Get the previous adjacent edge to the edge given.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "Uuid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Uuid", "type": "string", "format": "uuid" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge)\n |> close(%)\n\nexample = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [getPreviousAdjacentEdge(referenceEdge)]\n }, %)" ] }, { "name": "helix", "summary": "Create a helix on a cylinder.", "description": "", "tags": [], "args": [ { "name": "data", "type": "HelixData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "HelixData", "description": "Data for helices.", "type": "object", "required": [ "angleStart", "revolutions" ], "properties": { "revolutions": { "description": "Number of revolutions.", "type": "number", "format": "double" }, "angleStart": { "description": "Start angle (in degrees).", "type": "number", "format": "double" }, "ccw": { "description": "Is the helix rotation counter clockwise? The default is `false`.", "default": false, "type": "boolean" }, "length": { "description": "Length of the helix. If this argument is not provided, the height of the solid is used.", "type": "number", "format": "double", "nullable": true } } }, "required": true }, { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "part001 = startSketchOn('XY')\n |> circle({ center: [5, 5], radius: 10 }, %)\n |> extrude(10, %)\n |> helix({\n angleStart: 0,\n ccw: true,\n revolutions: 16\n }, %)" ] }, { "name": "hole", "summary": "Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.", "description": "", "tags": [], "args": [ { "name": "hole_sketch", "type": "SketchSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSet", "description": "A sketch or a group of sketches.", "oneOf": [ { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "sketch" ] }, "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketches" ] } } } ], "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 5], %)\n |> line([5, 0], %)\n |> line([0, -5], %)\n |> close(%)\n |> hole(circle({ center: [1, 1], radius: .25 }, %), %)\n |> hole(circle({ center: [1, 4], radius: .25 }, %), %)\n\nexample = extrude(1, exampleSketch)", "fn squareHoleSketch = () => {\n squareSketch = startSketchOn('-XZ')\n |> startProfileAt([-1, -1], %)\n |> line([2, 0], %)\n |> line([0, 2], %)\n |> line([-2, 0], %)\n |> close(%)\n return squareSketch\n}\n\nexampleSketch = startSketchOn('-XZ')\n |> circle({ center: [0, 0], radius: 3 }, %)\n |> hole(squareHoleSketch(), %)\nexample = extrude(1, exampleSketch)" ] }, { "name": "hollow", "summary": "Make the inside of a 3D object hollow.", "description": "Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains around the exterior of the shape.", "tags": [], "args": [ { "name": "thickness", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Hollow a basic sketch.\nfirstSketch = startSketchOn('XY')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %)\n |> close(%)\n |> extrude(6, %)\n |> hollow(0.25, %)", "// Hollow a basic sketch.\nfirstSketch = startSketchOn('-XZ')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %)\n |> close(%)\n |> extrude(6, %)\n |> hollow(0.5, %)", "// Hollow a sketch on face object.\nsize = 100\ncase = startSketchOn('-XZ')\n |> startProfileAt([-size, -size], %)\n |> line([2 * size, 0], %)\n |> line([0, 2 * size], %)\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(65, %)\n\nthing1 = startSketchOn(case, 'end')\n |> circle({\n center: [-size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\nthing2 = startSketchOn(case, 'end')\n |> circle({\n center: [size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\nhollow(0.5, case)" ] }, { "name": "import", "summary": "Import a CAD file.", "description": "For formats lacking unit data (such as STL, OBJ, or PLY files), the default unit of measurement is millimeters. Alternatively you may specify the unit by passing your desired measurement unit in the options parameter. When importing a GLTF file, the bin file will be imported as well. Import paths are relative to the current project directory.\n\nNote: The import command currently only works when using the native Modeling App.", "tags": [], "args": [ { "name": "file_path", "type": "String", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true }, { "name": "options", "type": "ImportFormat", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_ImportFormat", "allOf": [ { "$ref": "#/components/schemas/ImportFormat" } ], "nullable": true, "definitions": { "ImportFormat": { "description": "Import format specifier", "oneOf": [ { "description": "Autodesk Filmbox (FBX) format", "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "fbx" ] } } }, { "description": "Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).", "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "gltf" ] } } }, { "description": "Wavefront OBJ format.", "type": "object", "required": [ "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "obj" ] }, "coords": { "description": "Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.", "allOf": [ { "$ref": "#/components/schemas/System" } ], "nullable": true }, "units": { "description": "The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.", "allOf": [ { "$ref": "#/components/schemas/UnitLength" } ] } } }, { "description": "The PLY Polygon File Format.", "type": "object", "required": [ "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ply" ] }, "coords": { "description": "Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.", "allOf": [ { "$ref": "#/components/schemas/System" } ], "nullable": true }, "units": { "description": "The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.", "allOf": [ { "$ref": "#/components/schemas/UnitLength" } ] } } }, { "description": "SolidWorks part (SLDPRT) format.", "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sldprt" ] } } }, { "description": "ISO 10303-21 (STEP) format.", "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "step" ] } } }, { "description": "ST**ereo**L**ithography format.", "type": "object", "required": [ "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "stl" ] }, "coords": { "description": "Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.", "allOf": [ { "$ref": "#/components/schemas/System" } ], "nullable": true }, "units": { "description": "The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.", "allOf": [ { "$ref": "#/components/schemas/UnitLength" } ] } } } ] }, "System": { "description": "Co-ordinate system definition.\n\nThe `up` axis must be orthogonal to the `forward` axis.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)", "type": "object", "required": [ "forward", "up" ], "properties": { "forward": { "description": "Axis the front face of a model looks along.", "allOf": [ { "$ref": "#/components/schemas/AxisDirectionPair" } ] }, "up": { "description": "Axis pointing up and away from a model.", "allOf": [ { "$ref": "#/components/schemas/AxisDirectionPair" } ] } } }, "AxisDirectionPair": { "description": "An [`Axis`] paired with a [`Direction`].", "type": "object", "required": [ "axis", "direction" ], "properties": { "axis": { "description": "Axis specifier.", "allOf": [ { "$ref": "#/components/schemas/Axis" } ] }, "direction": { "description": "Specifies which direction the axis is pointing.", "allOf": [ { "$ref": "#/components/schemas/Direction" } ] } } }, "Axis": { "description": "Co-ordinate axis specifier.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1", "oneOf": [ { "description": "'Y' axis.", "type": "string", "enum": [ "y" ] }, { "description": "'Z' axis.", "type": "string", "enum": [ "z" ] } ] }, "Direction": { "description": "Specifies the sign of a co-ordinate axis.", "oneOf": [ { "description": "Increasing numbers.", "type": "string", "enum": [ "positive" ] }, { "description": "Decreasing numbers.", "type": "string", "enum": [ "negative" ] } ] }, "UnitLength": { "description": "The valid types of length units.", "oneOf": [ { "description": "Centimeters ", "type": "string", "enum": [ "cm" ] }, { "description": "Feet ", "type": "string", "enum": [ "ft" ] }, { "description": "Inches ", "type": "string", "enum": [ "in" ] }, { "description": "Meters ", "type": "string", "enum": [ "m" ] }, { "description": "Millimeters ", "type": "string", "enum": [ "mm" ] }, { "description": "Yards ", "type": "string", "enum": [ "yd" ] } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "ImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "ImportedGeometry", "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "value" ], "properties": { "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "model = import(\"tests/inputs/cube.obj\")", "model = import(\"tests/inputs/cube.obj\", { type: \"obj\", units: \"m\" })", "model = import(\"tests/inputs/cube.gltf\")", "model = import(\"tests/inputs/cube.sldprt\")", "model = import(\"tests/inputs/cube.step\")" ] }, { "name": "inch", "summary": "Inches conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to inches.\n\nFor example, if the current project uses inches, this function will return `1`. If the current project uses millimeters, this function will return `25.4`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * inch()` is more readable that your intent is \"I want 10 inches\" than `10 * 25.4`, if the project settings are in millimeters.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * inch()" ] }, { "name": "int", "summary": "Convert a number to an integer.", "description": "Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero.\n\nIf the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error.", "tags": [ "convert" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "i64", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "int64", "type": "integer", "format": "int64" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "n = int(ceil(5 / 2))\nassertEqual(n, 3, 0.0001, \"5/2 = 2.5, rounded up makes 3\")\n// Draw n cylinders.\nstartSketchOn('XZ')\n |> circle({ center: [0, 0], radius: 2 }, %)\n |> extrude(5, %)\n |> patternTransform(n, (id) => {\n return { translate: [4 * id, 0, 0] }\n}, %)" ] }, { "name": "lastSegX", "summary": "Extract the 'x' axis value of the last line segment in the provided 2-d", "description": "sketch.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([lastSegX(%), 0], %)\n |> line([-15, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "lastSegY", "summary": "Extract the 'y' axis value of the last line segment in the provided 2-d", "description": "sketch.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([0, lastSegY(%)], %)\n |> line([-15, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "legAngX", "summary": "Compute the angle of the given leg for x.", "description": "", "tags": [ "utilities" ], "args": [ { "name": "hypotenuse", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "leg", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "legAngX(5, 3)" ] }, { "name": "legAngY", "summary": "Compute the angle of the given leg for y.", "description": "", "tags": [ "utilities" ], "args": [ { "name": "hypotenuse", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "leg", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "legAngY(5, 3)" ] }, { "name": "legLen", "summary": "Compute the length of the given leg.", "description": "", "tags": [ "utilities" ], "args": [ { "name": "hypotenuse", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "leg", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "legLen(5, 3)" ] }, { "name": "line", "summary": "Draw a line relative to the current origin to a specified (x, y) away", "description": "from the current position.", "tags": [], "args": [ { "name": "delta", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([25, 15], %)\n |> line([5, -6], %)\n |> line([-10, -10], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "lineTo", "summary": "Draw a line from the current origin to some absolute (x, y) point.", "description": "", "tags": [], "args": [ { "name": "to", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> lineTo([10, 0], %)\n |> lineTo([0, 10], %)\n |> lineTo([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "ln", "summary": "Compute the natural logarithm of the number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([ln(100), 15], %)\n |> line([5, -6], %)\n |> line([-10, -10], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "loft", "summary": "Create a 3D surface or solid by interpolating between two or more sketches.", "description": "The sketches need to closed and on the same plane.", "tags": [], "args": [ { "name": "sketches", "type": "[Sketch]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Sketch", "type": "array", "items": { "$ref": "#/components/schemas/Sketch" }, "definitions": { "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, { "name": "data", "type": "LoftData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_LoftData", "allOf": [ { "$ref": "#/components/schemas/LoftData" } ], "nullable": true, "definitions": { "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "LoftData": { "description": "Data for a loft.", "type": "object", "properties": { "vDegree": { "description": "Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified.", "type": "integer", "format": "uint32", "minimum": 1.0, "nullable": true }, "bezApproximateRational": { "description": "Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary.", "default": null, "type": "boolean", "nullable": true }, "baseCurveIndex": { "description": "This can be set to override the automatically determined topological base curve, which is usually the first section encountered.", "default": null, "type": "integer", "format": "uint32", "minimum": 0.0, "nullable": true }, "tolerance": { "description": "Tolerance for the loft operation.", "default": null, "type": "number", "format": "double", "nullable": true } } } } }, "required": false } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Loft a square and a triangle.\nsquareSketch = startSketchOn('XY')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ntriangleSketch = startSketchOn(offsetPlane('XY', 75))\n |> startProfileAt([0, 125], %)\n |> line([-15, -30], %)\n |> line([30, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\nloft([squareSketch, triangleSketch])", "// Loft a square, a circle, and another circle.\nsquareSketch = startSketchOn('XY')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch0 = startSketchOn(offsetPlane('XY', 75))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\ncircleSketch1 = startSketchOn(offsetPlane('XY', 150))\n |> circle({ center: [0, 100], radius: 20 }, %)\n\nloft([\n squareSketch,\n circleSketch0,\n circleSketch1\n])", "// Loft a square, a circle, and another circle with options.\nsquareSketch = startSketchOn('XY')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch0 = startSketchOn(offsetPlane('XY', 75))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\ncircleSketch1 = startSketchOn(offsetPlane('XY', 150))\n |> circle({ center: [0, 100], radius: 20 }, %)\n\nloft([\n squareSketch,\n circleSketch0,\n circleSketch1\n], {\n // This can be set to override the automatically determined\n // topological base curve, which is usually the first section encountered.\n baseCurveIndex: 0,\n // Attempt to approximate rational curves (such as arcs) using a bezier.\n // This will remove banding around interpolations between arcs and non-arcs.\n // It may produce errors in other scenarios Over time, this field won't be necessary.\n bezApproximateRational: false,\n // Tolerance for the loft operation.\n tolerance: 0.000001,\n // Degree of the interpolation. Must be greater than zero.\n // For example, use 2 for quadratic, or 3 for cubic interpolation in\n // the V direction. This defaults to 2, if not specified.\n vDegree: 2\n})" ] }, { "name": "log", "summary": "Compute the logarithm of the number with respect to an arbitrary base.", "description": "The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "base", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([log(100, 5), 0], %)\n |> line([5, 8], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "log10", "summary": "Compute the base 10 logarithm of the number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([log10(100), 0], %)\n |> line([5, 8], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "log2", "summary": "Compute the base 2 logarithm of the number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([log2(100), 0], %)\n |> line([5, 8], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "m", "summary": "Meters conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to meters.\n\nFor example, if the current project uses inches, this function will return `39.3701`. If the current project uses millimeters, this function will return `1000`. If the current project uses meters, this function will return `1`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * m()` is more readable that your intent is \"I want 10 meters\" than `10 * 1000`, if the project settings are in millimeters.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * m()" ] }, { "name": "map", "summary": "Apply a function to every element of a list.", "description": "Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(c)]`", "tags": [], "args": [ { "name": "array", "type": "[KclValue]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_KclValue", "type": "array", "items": { "$ref": "#/components/schemas/KclValue" }, "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, { "name": "map_fn", "type": "FunctionParam", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionParam", "type": "null", "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true } ], "returnValue": { "name": "", "type": "[KclValue]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_KclValue", "type": "array", "items": { "$ref": "#/components/schemas/KclValue" }, "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "r = 10 // radius\nfn drawCircle = (id) => {\n return startSketchOn(\"XY\")\n |> circle({ center: [id * 2 * r, 0], radius: r }, %)\n}\n\n// Call `drawCircle`, passing in each element of the array.\n// The outputs from each `drawCircle` form a new array,\n// which is the return value from `map`.\ncircles = map([1..3], drawCircle)", "r = 10 // radius\n// Call `map`, using an anonymous function instead of a named one.\ncircles = map([1..3], (id) => {\n return startSketchOn(\"XY\")\n |> circle({ center: [id * 2 * r, 0], radius: r }, %)\n})" ] }, { "name": "max", "summary": "Compute the maximum of the given arguments.", "description": "", "tags": [ "math" ], "args": [ { "name": "args", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_double", "type": "array", "items": { "type": "number", "format": "double" } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 70,\n length: max(15, 31, 4, 13, 22)\n }, %)\n |> line([20, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "min", "summary": "Compute the minimum of the given arguments.", "description": "", "tags": [ "math" ], "args": [ { "name": "args", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_double", "type": "array", "items": { "type": "number", "format": "double" } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 70,\n length: min(15, 31, 4, 13, 22)\n }, %)\n |> line([20, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "mirror2d", "summary": "Mirror a sketch.", "description": "Only works on unclosed sketches for now.\n\nMirror occurs around a local sketch axis rather than a global axis.", "tags": [], "args": [ { "name": "data", "type": "Mirror2dData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Mirror2dData", "description": "Data for a mirror.", "type": "object", "required": [ "axis" ], "properties": { "axis": { "description": "Axis to use as mirror.", "allOf": [ { "$ref": "#/components/schemas/AxisOrEdgeReference" } ] } }, "definitions": { "AxisOrEdgeReference": { "description": "Axis or tagged edge.", "anyOf": [ { "description": "Axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin": { "description": "Axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } } }, "additionalProperties": false } ] }, "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "sketch_set", "type": "SketchSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSet", "description": "A sketch or a group of sketches.", "oneOf": [ { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "sketch" ] }, "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketches" ] } } } ], "definitions": { "AxisOrEdgeReference": { "description": "Axis or tagged edge.", "anyOf": [ { "description": "Axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin": { "description": "Axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } } }, "additionalProperties": false } ] }, "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "[Sketch]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Sketch", "type": "array", "items": { "$ref": "#/components/schemas/Sketch" }, "definitions": { "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Mirror an un-closed sketch across the Y axis.\nsketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 10], %)\n |> line([15, 0], %)\n |> line([-7, -3], %)\n |> line([9, -1], %)\n |> line([-8, -5], %)\n |> line([9, -3], %)\n |> line([-8, -3], %)\n |> line([9, -1], %)\n |> line([-19, -0], %)\n |> mirror2d({ axis: 'Y' }, %)\n\nexample = extrude(10, sketch001)", "// Mirror a un-closed sketch across the Y axis.\nsketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 8.5], %)\n |> line([20, -8.5], %)\n |> line([-20, -8.5], %)\n |> mirror2d({ axis: 'Y' }, %)\n\nexample = extrude(10, sketch001)", "// Mirror a un-closed sketch across an edge.\nhelper001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, $edge001)\n\nsketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 8.5], %)\n |> line([20, -8.5], %)\n |> line([-20, -8.5], %)\n |> mirror2d({ axis: edge001 }, %)\n\nexample = extrude(10, sketch001)", "// Mirror an un-closed sketch across a custom axis.\nsketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 8.5], %)\n |> line([20, -8.5], %)\n |> line([-20, -8.5], %)\n |> mirror2d({\n axis: {\n custom: { axis: [0.0, 1.0], origin: [0.0, 0.0] }\n }\n }, %)\n\nexample = extrude(10, sketch001)" ] }, { "name": "mm", "summary": "Millimeters conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to millimeters.\n\nFor example, if the current project uses inches, this function will return `(1/25.4)`. If the current project uses millimeters, this function will return `1`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * mm()` is more readable that your intent is \"I want 10 millimeters\" than `10 * (1/25.4)`, if the project settings are in inches.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * mm()" ] }, { "name": "offsetPlane", "summary": "Offset a plane by a distance along its normal.", "description": "For example, if you offset the 'XZ' plane by 10, the new plane will be parallel to the 'XZ' plane and 10 units away from it.", "tags": [], "args": [ { "name": "std_plane", "type": "StandardPlane", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "StandardPlane", "description": "One of the standard planes.", "oneOf": [ { "description": "The XY plane.", "type": "string", "enum": [ "XY" ] }, { "description": "The opposite side of the XY plane.", "type": "string", "enum": [ "-XY" ] }, { "description": "The XZ plane.", "type": "string", "enum": [ "XZ" ] }, { "description": "The opposite side of the XZ plane.", "type": "string", "enum": [ "-XZ" ] }, { "description": "The YZ plane.", "type": "string", "enum": [ "YZ" ] }, { "description": "The opposite side of the YZ plane.", "type": "string", "enum": [ "-YZ" ] } ] }, "required": true }, { "name": "offset", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "PlaneData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "PlaneData", "description": "Data for a plane.", "oneOf": [ { "description": "The XY plane.", "type": "string", "enum": [ "XY" ] }, { "description": "The opposite side of the XY plane.", "type": "string", "enum": [ "-XY" ] }, { "description": "The XZ plane.", "type": "string", "enum": [ "XZ" ] }, { "description": "The opposite side of the XZ plane.", "type": "string", "enum": [ "-XZ" ] }, { "description": "The YZ plane.", "type": "string", "enum": [ "YZ" ] }, { "description": "The opposite side of the YZ plane.", "type": "string", "enum": [ "-YZ" ] }, { "description": "A defined plane.", "type": "object", "required": [ "plane" ], "properties": { "plane": { "type": "object", "required": [ "origin", "xAxis", "yAxis", "zAxis" ], "properties": { "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] } } } }, "additionalProperties": false } ], "definitions": { "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Loft a square and a circle on the `XY` plane using offset.\nsquareSketch = startSketchOn('XY')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch = startSketchOn(offsetPlane('XY', 150))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\nloft([squareSketch, circleSketch])", "// Loft a square and a circle on the `XZ` plane using offset.\nsquareSketch = startSketchOn('XZ')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch = startSketchOn(offsetPlane('XZ', 150))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\nloft([squareSketch, circleSketch])", "// Loft a square and a circle on the `YZ` plane using offset.\nsquareSketch = startSketchOn('YZ')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch = startSketchOn(offsetPlane('YZ', 150))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\nloft([squareSketch, circleSketch])", "// Loft a square and a circle on the `-XZ` plane using offset.\nsquareSketch = startSketchOn('-XZ')\n |> startProfileAt([-100, 200], %)\n |> line([200, 0], %)\n |> line([0, -200], %)\n |> line([-200, 0], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\ncircleSketch = startSketchOn(offsetPlane('-XZ', -150))\n |> circle({ center: [0, 100], radius: 50 }, %)\n\nloft([squareSketch, circleSketch])" ] }, { "name": "patternCircular2d", "summary": "Repeat a 2-dimensional sketch some number of times along a partial or", "description": "complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.", "tags": [], "args": [ { "name": "data", "type": "CircularPattern2dData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "CircularPattern2dData", "description": "Data for a circular pattern on a 2D sketch.", "type": "object", "required": [ "arcDegrees", "center", "instances", "rotateDuplicates" ], "properties": { "instances": { "description": "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect.", "allOf": [ { "$ref": "#/components/schemas/Uint" } ] }, "center": { "description": "The center about which to make the pattern. This is a 2D vector.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "arcDegrees": { "description": "The arc angle (in degrees) to place the repetitions. Must be greater than 0.", "type": "number", "format": "double" }, "rotateDuplicates": { "description": "Whether or not to rotate the duplicates as they are copied.", "type": "boolean" } }, "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 } } }, "required": true }, { "name": "sketch_set", "type": "SketchSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSet", "description": "A sketch or a group of sketches.", "oneOf": [ { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "sketch" ] }, "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketches" ] } } } ], "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "[Sketch]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Sketch", "type": "array", "items": { "$ref": "#/components/schemas/Sketch" }, "definitions": { "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([.5, 25], %)\n |> line([0, 5], %)\n |> line([-1, 0], %)\n |> line([0, -5], %)\n |> close(%)\n |> patternCircular2d({\n center: [0, 0],\n instances: 13,\n arcDegrees: 360,\n rotateDuplicates: true\n }, %)\n\nexample = extrude(1, exampleSketch)" ] }, { "name": "patternCircular3d", "summary": "Repeat a 3-dimensional solid some number of times along a partial or", "description": "complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.", "tags": [], "args": [ { "name": "data", "type": "CircularPattern3dData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "CircularPattern3dData", "description": "Data for a circular pattern on a 3D model.", "type": "object", "required": [ "arcDegrees", "axis", "center", "instances", "rotateDuplicates" ], "properties": { "instances": { "description": "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect.", "allOf": [ { "$ref": "#/components/schemas/Uint" } ] }, "axis": { "description": "The axis around which to make the pattern. This is a 3D vector.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 }, "center": { "description": "The center about which to make the pattern. This is a 3D vector.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 }, "arcDegrees": { "description": "The arc angle (in degrees) to place the repetitions. Must be greater than 0.", "type": "number", "format": "double" }, "rotateDuplicates": { "description": "Whether or not to rotate the duplicates as they are copied.", "type": "boolean" } }, "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 } } }, "required": true }, { "name": "solid_set", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true } ], "returnValue": { "name": "", "type": "[Solid]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Solid", "type": "array", "items": { "$ref": "#/components/schemas/Solid" }, "definitions": { "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> circle({ center: [0, 0], radius: 1 }, %)\n\nexample = extrude(-5, exampleSketch)\n |> patternCircular3d({\n axis: [1, -1, 0],\n center: [10, -20, 0],\n instances: 11,\n arcDegrees: 360,\n rotateDuplicates: true\n }, %)" ] }, { "name": "patternLinear2d", "summary": "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount", "description": "of distance between each repetition, some specified number of times.", "tags": [], "args": [ { "name": "data", "type": "LinearPattern2dData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "LinearPattern2dData", "description": "Data for a linear pattern on a 2D sketch.", "type": "object", "required": [ "axis", "distance", "instances" ], "properties": { "instances": { "description": "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect.", "allOf": [ { "$ref": "#/components/schemas/Uint" } ] }, "distance": { "description": "The distance between each repetition. This can also be referred to as spacing.", "type": "number", "format": "double" }, "axis": { "description": "The axis of the pattern. This is a 2D vector.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } }, "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 } } }, "required": true }, { "name": "sketch_set", "type": "SketchSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSet", "description": "A sketch or a group of sketches.", "oneOf": [ { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "sketch" ] }, "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketches" ] } } } ], "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "[Sketch]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Sketch", "type": "array", "items": { "$ref": "#/components/schemas/Sketch" }, "definitions": { "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> circle({ center: [0, 0], radius: 1 }, %)\n |> patternLinear2d({\n axis: [1, 0],\n instances: 7,\n distance: 4\n }, %)\n\nexample = extrude(1, exampleSketch)" ] }, { "name": "patternLinear3d", "summary": "Repeat a 3-dimensional solid along a linear path, with a dynamic amount", "description": "of distance between each repetition, some specified number of times.", "tags": [], "args": [ { "name": "data", "type": "LinearPattern3dData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "LinearPattern3dData", "description": "Data for a linear pattern on a 3D model.", "type": "object", "required": [ "axis", "distance", "instances" ], "properties": { "instances": { "description": "The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect.", "allOf": [ { "$ref": "#/components/schemas/Uint" } ] }, "distance": { "description": "The distance between each repetition. This can also be referred to as spacing.", "type": "number", "format": "double" }, "axis": { "description": "The axis of the pattern.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 } }, "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 } } }, "required": true }, { "name": "solid_set", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "Uint": { "type": "integer", "format": "uint32", "minimum": 0.0 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true } ], "returnValue": { "name": "", "type": "[Solid]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Solid", "type": "array", "items": { "$ref": "#/components/schemas/Solid" }, "definitions": { "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 2], %)\n |> line([3, 1], %)\n |> line([0, -4], %)\n |> close(%)\n\nexample = extrude(1, exampleSketch)\n |> patternLinear3d({\n axis: [1, 0, 1],\n instances: 7,\n distance: 6\n }, %)" ] }, { "name": "patternTransform", "summary": "Repeat a 3-dimensional solid, changing it each time.", "description": "Replicates the 3D solid, applying a transformation function to each replica. Transformation function could alter rotation, scale, visibility, position, etc.\n\nThe `patternTransform` call itself takes a number for how many total instances of the shape should be. For example, if you use a circle with `patternTransform(4, transform)` then there will be 4 circles: the original, and 3 created by replicating the original and calling the transform function on each.\n\nThe transform function takes a single parameter: an integer representing which number replication the transform is for. E.g. the first replica to be transformed will be passed the argument `1`. This simplifies your math: the transform function can rely on id `0` being the original instance passed into the `patternTransform`. See the examples.\n\nThe transform function returns a transform object. All properties of the object are optional, they each default to \"no change\". So the overall transform object defaults to \"no change\" too. Its properties are:\n\n - `translate` (3D point)\n\n Translates the replica, moving its position in space.\n\n - `replicate` (bool)\n\n If false, this ID will not actually copy the object. It'll be skipped.\n\n - `scale` (3D point)\n\n Stretches the object, multiplying its width in the given dimension by the point's component in that direction.\n\n - `rotation` (object, with the following properties)\n\n - `rotation.axis` (a 3D point, defaults to the Z axis)\n\n - `rotation.angle` (number of degrees)\n\n - `rotation.origin` (either \"local\" i.e. rotate around its own center, \"global\" i.e. rotate around the scene's center, or a 3D point, defaults to \"local\")", "tags": [], "args": [ { "name": "total_instances", "type": "u32", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0 }, "required": true }, { "name": "transform_function", "type": "FunctionParam", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionParam", "type": "null" }, "required": true }, { "name": "solid_set", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true } ], "returnValue": { "name": "", "type": "[Solid]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_Solid", "type": "array", "items": { "$ref": "#/components/schemas/Solid" }, "definitions": { "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Each instance will be shifted along the X axis.\nfn transform = (id) => {\n return { translate: [4 * id, 0, 0] }\n}\n\n// Sketch 4 cylinders.\nsketch001 = startSketchOn('XZ')\n |> circle({ center: [0, 0], radius: 2 }, %)\n |> extrude(5, %)\n |> patternTransform(4, transform, %)", "// Each instance will be shifted along the X axis,\n// with a gap between the original (at x = 0) and the first replica\n// (at x = 8). This is because `id` starts at 1.\nfn transform = (id) => {\n return { translate: [4 * (1 + id), 0, 0] }\n}\n\nsketch001 = startSketchOn('XZ')\n |> circle({ center: [0, 0], radius: 2 }, %)\n |> extrude(5, %)\n |> patternTransform(4, transform, %)", "fn cube = (length, center) => {\n l = length / 2\n x = center[0]\n y = center[1]\n p0 = [-l + x, -l + y]\n p1 = [-l + x, l + y]\n p2 = [l + x, l + y]\n p3 = [l + x, -l + y]\n\n return startSketchAt(p0)\n |> lineTo(p1, %)\n |> lineTo(p2, %)\n |> lineTo(p3, %)\n |> lineTo(p0, %)\n |> close(%)\n |> extrude(length, %)\n}\n\nwidth = 20\nfn transform = (i) => {\n return {\n // Move down each time.\n translate: [0, 0, -i * width],\n // Make the cube longer, wider and flatter each time.\n scale: [pow(1.1, i), pow(1.1, i), pow(0.9, i)],\n // Turn by 15 degrees each time.\n rotation: { angle: 15 * i, origin: \"local\" }\n}\n}\n\nmyCubes = cube(width, [100, 0])\n |> patternTransform(25, transform, %)", "fn cube = (length, center) => {\n l = length / 2\n x = center[0]\n y = center[1]\n p0 = [-l + x, -l + y]\n p1 = [-l + x, l + y]\n p2 = [l + x, l + y]\n p3 = [l + x, -l + y]\n\n return startSketchAt(p0)\n |> lineTo(p1, %)\n |> lineTo(p2, %)\n |> lineTo(p3, %)\n |> lineTo(p0, %)\n |> close(%)\n |> extrude(length, %)\n}\n\nwidth = 20\nfn transform = (i) => {\n return {\n translate: [0, 0, -i * width],\n rotation: {\n angle: 90 * i,\n // Rotate around the overall scene's origin.\n origin: \"global\"\n }\n}\n}\nmyCubes = cube(width, [100, 100])\n |> patternTransform(4, transform, %)", "// Parameters\nr = 50 // base radius\nh = 10 // layer height\nt = 0.005 // taper factor [0-1)\n// Defines how to modify each layer of the vase.\n// Each replica is shifted up the Z axis, and has a smoothly-varying radius\nfn transform = (replicaId) => {\n scale = r * abs(1 - (t * replicaId)) * (5 + cos(replicaId / 8))\n return {\n translate: [0, 0, replicaId * 10],\n scale: [scale, scale, 0]\n}\n}\n// Each layer is just a pretty thin cylinder.\nfn layer = () => {\n return startSketchOn(\"XY\")\n // or some other plane idk\n |> circle({ center: [0, 0], radius: 1 }, %, $tag1)\n |> extrude(h, %)\n}\n// The vase is 100 layers tall.\n// The 100 layers are replica of each other, with a slight transformation applied to each.\nvase = layer()\n |> patternTransform(100, transform, %)" ] }, { "name": "pi", "summary": "Return the value of `pi`. Archimedes’ constant (π).", "description": "", "tags": [ "math" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "circumference = 70\n\nexampleSketch = startSketchOn(\"XZ\")\n |> circle({\n center: [0, 0],\n radius: circumference / (2 * pi())\n }, %)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "polar", "summary": "Convert polar/sphere (azimuth, elevation, distance) coordinates to", "description": "cartesian (x/y/z grid) coordinates.", "tags": [], "args": [ { "name": "data", "type": "PolarCoordsData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "PolarCoordsData", "description": "Data for polar coordinates.", "type": "object", "required": [ "angle", "length" ], "properties": { "angle": { "description": "The angle of the line (in degrees).", "type": "number", "format": "double" }, "length": { "description": "The length of the line.", "type": "number", "format": "double" } } }, "required": true } ], "returnValue": { "name": "", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line(polar({ angle: 30, length: 5 }), %, $thing)\n |> line([0, 5], %)\n |> line([segEndX(thing), 0], %)\n |> line([-20, 10], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "polygon", "summary": "Create a regular polygon with the specified number of sides that is either inscribed or circumscribed around a circle of the specified radius.", "description": "", "tags": [], "args": [ { "name": "data", "type": "PolygonData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "PolygonData", "description": "Data for drawing a polygon", "type": "object", "required": [ "center", "numSides", "radius" ], "properties": { "radius": { "description": "The radius of the polygon", "type": "number", "format": "double" }, "numSides": { "description": "The number of sides in the polygon", "type": "integer", "format": "uint64", "minimum": 0.0 }, "center": { "description": "The center point of the polygon", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "inscribed": { "description": "Whether the polygon is inscribed (true) or circumscribed (false) about a circle with the specified radius", "default": true, "type": "boolean" } } }, "required": true }, { "name": "sketch_surface_or_group", "type": "SketchOrSurface", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchOrSurface", "description": "A sketch surface or a sketch.", "anyOf": [ { "$ref": "#/components/schemas/SketchSurface" }, { "$ref": "#/components/schemas/Sketch" } ], "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Create a regular hexagon inscribed in a circle of radius 10\nhex = startSketchOn('XY')\n |> polygon({\n radius: 10,\n numSides: 6,\n center: [0, 0],\n inscribed: true\n }, %)\n\nexample = extrude(5, hex)", "// Create a square circumscribed around a circle of radius 5\nsquare = startSketchOn('XY')\n |> polygon({\n radius: 5.0,\n numSides: 4,\n center: [10, 10],\n inscribed: false\n }, %)\nexample = extrude(5, square)" ] }, { "name": "pow", "summary": "Compute the number to a power.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "pow", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 50, length: pow(5, 2) }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "profileStart", "summary": "Extract the provided 2-dimensional sketch's profile's origin", "description": "value.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XY')\n |> startProfileAt([5, 2], %)\n |> angledLine({ angle: 120, length: 50 }, %, $seg01)\n |> angledLine({\n angle: segAng(seg01) + 120,\n length: 50\n }, %)\n |> lineTo(profileStart(%), %)\n |> close(%)\n |> extrude(20, %)" ] }, { "name": "profileStartX", "summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x'", "description": "value.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XY')\n |> startProfileAt([5, 2], %)\n |> angledLine([-26.6, 50], %)\n |> angledLine([90, 50], %)\n |> angledLineToX({ angle: 30, to: profileStartX(%) }, %)" ] }, { "name": "profileStartY", "summary": "Extract the provided 2-dimensional sketch's profile's origin's 'y'", "description": "value.", "tags": [], "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn('XY')\n |> startProfileAt([5, 2], %)\n |> angledLine({ angle: -60, length: 14 }, %)\n |> angledLineToY({ angle: 30, to: profileStartY(%) }, %)" ] }, { "name": "push", "summary": "Append an element to the end of an array.", "description": "Returns a new array with the element appended.", "tags": [], "args": [ { "name": "array", "type": "[KclValue]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_KclValue", "type": "array", "items": { "$ref": "#/components/schemas/KclValue" }, "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, { "name": "elem", "type": "KclValue", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "KclValue", "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true } ], "returnValue": { "name": "", "type": "KclValue", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "KclValue", "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "oneOf": [ { "description": "The path the tag is on.", "type": "object", "required": [ "path" ], "properties": { "path": { "$ref": "#/components/schemas/Path" } }, "additionalProperties": false }, { "description": "The surface information for the tag.", "type": "object", "required": [ "surface" ], "properties": { "surface": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "additionalProperties": false } ], "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "arr = [1, 2, 3]\nnew_arr = push(arr, 4)\nassertEqual(new_arr[3], 4, 0.00001, \"4 was added to the end of the array\")" ] }, { "name": "reduce", "summary": "Take a starting value. Then, for each element of an array, calculate the next value,", "description": "using the previous value and the element.", "tags": [], "args": [ { "name": "array", "type": "[KclValue]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_KclValue", "type": "array", "items": { "$ref": "#/components/schemas/KclValue" }, "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, { "name": "start", "type": "KclValue", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "KclValue", "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, { "name": "reduce_fn", "type": "FunctionParam", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionParam", "type": "null", "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true } ], "returnValue": { "name": "", "type": "KclValue", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "KclValue", "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FunctionExpression": { "type": "object", "required": [ "body", "end", "params", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Parameter": { "description": "Parameter of a KCL function.", "type": "object", "required": [ "identifier", "optional" ], "properties": { "identifier": { "description": "The parameter's label or name.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "optional": { "description": "Is the parameter optional?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Identifier": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Program": { "description": "A KCL program top level, or function body.", "type": "object", "required": [ "body", "end", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/BodyItem" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "BodyItem": { "oneOf": [ { "type": "object", "required": [ "end", "items", "path", "raw_path", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ImportStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ImportItem" } }, "path": { "type": "string" }, "raw_path": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "expression", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ExpressionStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "expression": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "declarations", "end", "kind", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "VariableDeclaration" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "declarations": { "type": "array", "items": { "$ref": "#/components/schemas/VariableDeclarator" } }, "visibility": { "$ref": "#/components/schemas/ItemVisibility" }, "kind": { "$ref": "#/components/schemas/VariableKind" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ReturnStatement" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "argument": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ImportItem": { "type": "object", "required": [ "end", "name", "start" ], "properties": { "name": { "description": "Name of the item to import.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "alias": { "description": "Rename the item using an identifier after \"as\".", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ], "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Expr": { "description": "An expression can be evaluated to yield a single KCL value.", "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "params", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "FunctionExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "params": { "type": "array", "items": { "$ref": "#/components/schemas/Parameter" } }, "body": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "body", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "body": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "PipeSubstitution" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "elements", "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "endElement", "endInclusive", "start", "startElement", "type" ], "properties": { "type": { "type": "string", "enum": [ "ArrayRangeExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "startElement": { "$ref": "#/components/schemas/Expr" }, "endElement": { "$ref": "#/components/schemas/Expr" }, "endInclusive": { "description": "Is the `end_element` included in the range?", "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "properties", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "ObjectExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "properties": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectProperty" } }, "nonCodeMeta": { "$ref": "#/components/schemas/NonCodeMeta" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).", "type": "object", "required": [ "end", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "None" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } } ] }, "LiteralValue": { "anyOf": [ { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "boolean" } ] }, "BinaryOperator": { "oneOf": [ { "description": "Add two numbers.", "type": "string", "enum": [ "+" ] }, { "description": "Subtract two numbers.", "type": "string", "enum": [ "-" ] }, { "description": "Multiply two numbers.", "type": "string", "enum": [ "*" ] }, { "description": "Divide two numbers.", "type": "string", "enum": [ "/" ] }, { "description": "Modulo two numbers.", "type": "string", "enum": [ "%" ] }, { "description": "Raise a number to a power.", "type": "string", "enum": [ "^" ] }, { "description": "Are two numbers equal?", "type": "string", "enum": [ "==" ] }, { "description": "Are two numbers not equal?", "type": "string", "enum": [ "!=" ] }, { "description": "Is left greater than right", "type": "string", "enum": [ ">" ] }, { "description": "Is left greater than or equal to right", "type": "string", "enum": [ ">=" ] }, { "description": "Is left less than right", "type": "string", "enum": [ "<" ] }, { "description": "Is left less than or equal to right", "type": "string", "enum": [ "<=" ] } ] }, "BinaryPart": { "oneOf": [ { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "left", "operator", "right", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "BinaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/BinaryOperator" }, "left": { "$ref": "#/components/schemas/BinaryPart" }, "right": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "arguments", "callee", "end", "optional", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "CallExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "callee": { "$ref": "#/components/schemas/Identifier" }, "arguments": { "type": "array", "items": { "$ref": "#/components/schemas/Expr" } }, "optional": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "argument", "end", "operator", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "UnaryExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "operator": { "$ref": "#/components/schemas/UnaryOperator" }, "argument": { "$ref": "#/components/schemas/BinaryPart" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "cond", "else_ifs", "end", "final_else", "start", "then_val", "type" ], "properties": { "type": { "type": "string", "enum": [ "IfExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "else_ifs": { "type": "array", "items": { "$ref": "#/components/schemas/ElseIf" } }, "final_else": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "UnaryOperator": { "oneOf": [ { "description": "Negate a number.", "type": "string", "enum": [ "-" ] }, { "description": "Negate a boolean.", "type": "string", "enum": [ "!" ] } ] }, "MemberObject": { "oneOf": [ { "type": "object", "required": [ "computed", "end", "object", "property", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "MemberExpression" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "object": { "$ref": "#/components/schemas/MemberObject" }, "property": { "$ref": "#/components/schemas/LiteralIdentifier" }, "computed": { "type": "boolean" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "LiteralIdentifier": { "oneOf": [ { "type": "object", "required": [ "end", "name", "start", "type" ], "properties": { "type": { "type": "string", "enum": [ "Identifier" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "name": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "type": "object", "required": [ "end", "raw", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Literal" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/LiteralValue" }, "raw": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } ] }, "ElseIf": { "type": "object", "required": [ "cond", "end", "start", "then_val" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "cond": { "$ref": "#/components/schemas/Expr" }, "then_val": { "$ref": "#/components/schemas/Program" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeMeta": { "type": "object", "required": [ "nonCodeNodes", "start" ], "properties": { "nonCodeNodes": { "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } } }, "start": { "type": "array", "items": { "$ref": "#/components/schemas/NonCodeNode" } }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeNode": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "$ref": "#/components/schemas/NonCodeValue" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "NonCodeValue": { "oneOf": [ { "description": "A shebang. This is a special type of comment that is at the top of the file. It looks like this: ```python,no_run #!/usr/bin/env python ```", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "shebang" ] }, "value": { "type": "string" } } }, { "description": "An inline comment. Here are examples: `1 + 1 // This is an inline comment`. `1 + 1 /* Here's another */`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "inlineComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment. An example of this is the following: ```python,no_run /* This is a block comment */ 1 + 1 ``` Now this is important. The block comment is attached to the next line. This is always the case. Also the block comment doesn't have a new line above it. If it did it would be a `NewLineBlockComment`.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "blockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "description": "A block comment that has a new line above it. The user explicitly added a new line above the block comment.", "type": "object", "required": [ "style", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "newLineBlockComment" ] }, "value": { "type": "string" }, "style": { "$ref": "#/components/schemas/CommentStyle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "newLine" ] } } } ] }, "CommentStyle": { "oneOf": [ { "description": "Like // foo", "type": "string", "enum": [ "line" ] }, { "description": "Like /* foo */", "type": "string", "enum": [ "block" ] } ] }, "ObjectProperty": { "type": "object", "required": [ "end", "key", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "key": { "$ref": "#/components/schemas/Identifier" }, "value": { "$ref": "#/components/schemas/Expr" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "VariableDeclarator": { "type": "object", "required": [ "end", "id", "init", "start" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "id": { "description": "The identifier of the variable.", "allOf": [ { "$ref": "#/components/schemas/Identifier" } ] }, "init": { "description": "The value of the variable.", "allOf": [ { "$ref": "#/components/schemas/Expr" } ] }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "ItemVisibility": { "type": "string", "enum": [ "default", "export" ] }, "VariableKind": { "oneOf": [ { "description": "Declare a named constant.", "type": "string", "enum": [ "const" ] }, { "description": "Declare a function.", "type": "string", "enum": [ "fn" ] } ] }, "ProgramMemory": { "type": "object", "required": [ "currentEnv", "environments" ], "properties": { "environments": { "type": "array", "items": { "$ref": "#/components/schemas/Environment" } }, "currentEnv": { "$ref": "#/components/schemas/EnvironmentRef" }, "return": { "allOf": [ { "$ref": "#/components/schemas/KclValue" } ], "nullable": true } } }, "Environment": { "type": "object", "required": [ "bindings" ], "properties": { "bindings": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } }, "parent": { "allOf": [ { "$ref": "#/components/schemas/EnvironmentRef" } ], "nullable": true } } }, "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "UserVal" ] }, "value": {}, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "end", "start", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solids" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/Solid" } } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "__meta", "id", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "ImportedGeometry" ] }, "id": { "description": "The ID of the imported geometry.", "type": "string", "format": "uuid" }, "value": { "description": "The original file paths.", "type": "array", "items": { "type": "string" } }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": "object", "required": [ "__meta", "expression", "memory", "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] }, "expression": { "$ref": "#/components/schemas/FunctionExpression" }, "memory": { "$ref": "#/components/schemas/ProgramMemory" }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "EnvironmentRef": { "description": "An index pointing to an environment.", "type": "integer", "format": "uint", "minimum": 0.0 } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "fn decagon = (radius) => {\n step = 1 / 10 * tau()\n sketch001 = startSketchAt([cos(0) * radius, sin(0) * radius])\n return reduce([1..10], sketch001, (i, sg) => {\n x = cos(step * i) * radius\n y = sin(step * i) * radius\n return lineTo([x, y], sg)\n})\n}\ndecagon(5.0)\n |> close(%)", "array = [1, 2, 3]\nsum = reduce(array, 0, (i, result_so_far) => {\n return i + result_so_far\n})\nassertEqual(sum, 6, 0.00001, \"1 + 2 + 3 summed is 6\")", "fn add = (a, b) => {\n return a + b\n}\nfn sum = (array) => {\n return reduce(array, 0, add)\n}\nassertEqual(sum([1, 2, 3]), 6, 0.00001, \"1 + 2 + 3 summed is 6\")" ] }, { "name": "rem", "summary": "Compute the remainder after dividing `num` by `div`.", "description": "If `num` is negative, the result will be too.", "tags": [ "math" ], "args": [ { "name": "num", "type": "i64", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "int64", "type": "integer", "format": "int64" }, "required": true }, { "name": "divisor", "type": "i64", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "int64", "type": "integer", "format": "int64" }, "required": true } ], "returnValue": { "name": "", "type": "i64", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "int64", "type": "integer", "format": "int64" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "assertEqual(rem(int(7), int(4)), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(int(-7), int(4)), -3, 0.01, \"remainder is 3\")\nassertEqual(rem(int(7), int(-4)), 3, 0.01, \"remainder is 3\")" ] }, { "name": "revolve", "summary": "Rotate a sketch around some provided axis, creating a solid from its extent.", "description": "This, like extrude, is able to create a 3-dimensional solid from a 2-dimensional sketch. However, unlike extrude, this creates a solid by using the extent of the sketch as its revolved around an axis rather than using the extent of the sketch linearly translated through a third dimension.\n\nRevolve occurs around a local sketch axis rather than a global axis.", "tags": [], "args": [ { "name": "data", "type": "RevolveData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "RevolveData", "description": "Data for revolution surfaces.", "type": "object", "required": [ "axis" ], "properties": { "angle": { "description": "Angle to revolve (in degrees). Default is 360.", "default": null, "type": "number", "format": "double", "maximum": 360.0, "minimum": -360.0, "nullable": true }, "axis": { "description": "Axis of revolution.", "allOf": [ { "$ref": "#/components/schemas/AxisOrEdgeReference" } ] }, "tolerance": { "description": "Tolerance for the revolve operation.", "default": null, "type": "number", "format": "double", "nullable": true } }, "definitions": { "AxisOrEdgeReference": { "description": "Axis or tagged edge.", "anyOf": [ { "description": "Axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin": { "description": "Axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } } }, "additionalProperties": false } ] }, "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "AxisOrEdgeReference": { "description": "Axis or tagged edge.", "anyOf": [ { "description": "Axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin": { "description": "Axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } } }, "additionalProperties": false } ] }, "EdgeReference": { "description": "A tag or a uuid of an edge.", "anyOf": [ { "description": "A uuid of an edge.", "type": "string", "format": "uuid" }, { "description": "A tag of an edge.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "part001 = startSketchOn('XY')\n |> startProfileAt([4, 12], %)\n |> line([2, 0], %)\n |> line([0, -6], %)\n |> line([4, -6], %)\n |> line([0, -6], %)\n |> line([-3.75, -4.5], %)\n |> line([0, -5.5], %)\n |> line([-2, 0], %)\n |> close(%)\n |> revolve({ axis: 'y' }, %) // default angle is 360", "// A donut shape.\nsketch001 = startSketchOn('XY')\n |> circle({ center: [15, 0], radius: 5 }, %)\n |> revolve({ angle: 360, axis: 'y' }, %)", "part001 = startSketchOn('XY')\n |> startProfileAt([4, 12], %)\n |> line([2, 0], %)\n |> line([0, -6], %)\n |> line([4, -6], %)\n |> line([0, -6], %)\n |> line([-3.75, -4.5], %)\n |> line([0, -5.5], %)\n |> line([-2, 0], %)\n |> close(%)\n |> revolve({ axis: 'y', angle: 180 }, %)", "part001 = startSketchOn('XY')\n |> startProfileAt([4, 12], %)\n |> line([2, 0], %)\n |> line([0, -6], %)\n |> line([4, -6], %)\n |> line([0, -6], %)\n |> line([-3.75, -4.5], %)\n |> line([0, -5.5], %)\n |> line([-2, 0], %)\n |> close(%)\n |> revolve({ axis: 'y', angle: 180 }, %)\npart002 = startSketchOn(part001, 'end')\n |> startProfileAt([4.5, -5], %)\n |> line([0, 5], %)\n |> line([5, 0], %)\n |> line([0, -5], %)\n |> close(%)\n |> extrude(5, %)", "box = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 20], %)\n |> line([20, 0], %)\n |> line([0, -20], %)\n |> close(%)\n |> extrude(20, %)\n\nsketch001 = startSketchOn(box, \"END\")\n |> circle({ center: [10, 10], radius: 4 }, %)\n |> revolve({ angle: -90, axis: 'y' }, %)", "box = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 20], %)\n |> line([20, 0], %)\n |> line([0, -20], %, $revolveAxis)\n |> close(%)\n |> extrude(20, %)\n\nsketch001 = startSketchOn(box, \"END\")\n |> circle({ center: [10, 10], radius: 4 }, %)\n |> revolve({\n angle: 90,\n axis: getOppositeEdge(revolveAxis)\n }, %)", "box = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 20], %)\n |> line([20, 0], %)\n |> line([0, -20], %, $revolveAxis)\n |> close(%)\n |> extrude(20, %)\n\nsketch001 = startSketchOn(box, \"END\")\n |> circle({ center: [10, 10], radius: 4 }, %)\n |> revolve({\n angle: 90,\n axis: getOppositeEdge(revolveAxis),\n tolerance: 0.0001\n }, %)", "sketch001 = startSketchOn('XY')\n |> startProfileAt([10, 0], %)\n |> line([5, -5], %)\n |> line([5, 5], %)\n |> lineTo([profileStartX(%), profileStartY(%)], %)\n |> close(%)\n\npart001 = revolve({\n axis: {\n custom: { axis: [0.0, 1.0], origin: [0.0, 0.0] }\n }\n}, sketch001)" ] }, { "name": "segAng", "summary": "Compute the angle (in degrees) of the provided line segment.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([5, 10], %, $seg01)\n |> line([-10, 0], %)\n |> angledLine([segAng(seg01), 10], %)\n |> line([-10, 0], %)\n |> angledLine([segAng(seg01), -15], %)\n |> close(%)\n\nexample = extrude(4, exampleSketch)" ] }, { "name": "segEndX", "summary": "Compute the ending point of the provided line segment along the 'x' axis.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([20, 0], %, $thing)\n |> line([0, 5], %)\n |> line([segEndX(thing), 0], %)\n |> line([-20, 10], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "segEndY", "summary": "Compute the ending point of the provided line segment along the 'y' axis.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([20, 0], %)\n |> line([0, 3], %, $thing)\n |> line([-10, 0], %)\n |> line([0, segEndY(thing)], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "segLen", "summary": "Compute the length of the provided line segment.", "description": "", "tags": [], "args": [ { "name": "tag", "type": "TagIdentifier", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TagIdentifier", "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %, $thing)\n |> tangentialArc({ offset: -120, radius: 5 }, %)\n |> angledLine({ angle: -60, length: segLen(thing) }, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "shell", "summary": "Remove volume from a 3-dimensional shape such that a wall of the", "description": "provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.", "tags": [], "args": [ { "name": "data", "type": "ShellData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "ShellData", "description": "Data for shells.", "type": "object", "required": [ "faces", "thickness" ], "properties": { "thickness": { "description": "The thickness of the shell.", "type": "number", "format": "double" }, "faces": { "description": "The faces you want removed.", "type": "array", "items": { "$ref": "#/components/schemas/FaceTag" } } }, "definitions": { "FaceTag": { "description": "A tag for a face.", "anyOf": [ { "$ref": "#/components/schemas/StartOrEnd" }, { "description": "A tag for the face.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "StartOrEnd": { "oneOf": [ { "description": "The start face as in before you extruded. This could also be known as the bottom face. But we do not call it bottom because it would be the top face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "start" ] }, { "description": "The end face after you extruded. This could also be known as the top face. But we do not call it top because it would be the bottom face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "end" ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } } }, "required": true }, { "name": "solid_set", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "FaceTag": { "description": "A tag for a face.", "anyOf": [ { "$ref": "#/components/schemas/StartOrEnd" }, { "description": "A tag for the face.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "StartOrEnd": { "oneOf": [ { "description": "The start face as in before you extruded. This could also be known as the bottom face. But we do not call it bottom because it would be the top face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "start" ] }, { "description": "The end face after you extruded. This could also be known as the top face. But we do not call it top because it would be the bottom face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "end" ] } ] }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": true } ], "returnValue": { "name": "", "type": "SolidSet", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidSet", "description": "A solid or a group of solids.", "oneOf": [ { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "solid" ] }, "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solids" ] } } } ], "definitions": { "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "// Remove the end face for the extrusion.\nfirstSketch = startSketchOn('XY')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %)\n |> close(%)\n |> extrude(6, %)\n\n// Remove the end face for the extrusion.\nshell({ faces: ['end'], thickness: 0.25 }, firstSketch)", "// Remove the start face for the extrusion.\nfirstSketch = startSketchOn('-XZ')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %)\n |> close(%)\n |> extrude(6, %)\n\n// Remove the start face for the extrusion.\nshell({ faces: ['start'], thickness: 0.25 }, firstSketch)", "// Remove a tagged face and the end face for the extrusion.\nfirstSketch = startSketchOn('XY')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %, $myTag)\n |> close(%)\n |> extrude(6, %)\n\n// Remove a tagged face for the extrusion.\nshell({ faces: [myTag], thickness: 0.25 }, firstSketch)", "// Remove multiple faces at once.\nfirstSketch = startSketchOn('XY')\n |> startProfileAt([-12, 12], %)\n |> line([24, 0], %)\n |> line([0, -24], %)\n |> line([-24, 0], %, $myTag)\n |> close(%)\n |> extrude(6, %)\n\n// Remove a tagged face and the end face for the extrusion.\nshell({\n faces: [myTag, 'end'],\n thickness: 0.25\n}, firstSketch)", "// Shell a sketch on face.\nsize = 100\ncase = startSketchOn('-XZ')\n |> startProfileAt([-size, -size], %)\n |> line([2 * size, 0], %)\n |> line([0, 2 * size], %)\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(65, %)\n\nthing1 = startSketchOn(case, 'end')\n |> circle({\n center: [-size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\nthing2 = startSketchOn(case, 'end')\n |> circle({\n center: [size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\n// We put \"case\" in the shell function to shell the entire object.\nshell({ faces: ['start'], thickness: 5 }, case)", "// Shell a sketch on face object on the end face.\nsize = 100\ncase = startSketchOn('XY')\n |> startProfileAt([-size, -size], %)\n |> line([2 * size, 0], %)\n |> line([0, 2 * size], %)\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(65, %)\n\nthing1 = startSketchOn(case, 'end')\n |> circle({\n center: [-size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\nthing2 = startSketchOn(case, 'end')\n |> circle({\n center: [size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\n// We put \"thing1\" in the shell function to shell the end face of the object.\nshell({ faces: ['end'], thickness: 5 }, thing1)", "// Shell sketched on face objects on the end face, include all sketches to shell\n// the entire object.\n\n\nsize = 100\ncase = startSketchOn('XY')\n |> startProfileAt([-size, -size], %)\n |> line([2 * size, 0], %)\n |> line([0, 2 * size], %)\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(65, %)\n\nthing1 = startSketchOn(case, 'end')\n |> circle({\n center: [-size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\nthing2 = startSketchOn(case, 'end')\n |> circle({\n center: [size / 2, -size / 2],\n radius: 25\n }, %)\n |> extrude(50, %)\n\n// We put \"thing1\" and \"thing2\" in the shell function to shell the end face of the object.\nshell({ faces: ['end'], thickness: 5 }, [thing1, thing2])" ] }, { "name": "sin", "summary": "Compute the sine of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 50,\n length: 15 / sin(toDegrees(135))\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "sqrt", "summary": "Compute the square root of a number.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 50, length: sqrt(2500) }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "startProfileAt", "summary": "Start a new profile at a given point.", "description": "", "tags": [], "args": [ { "name": "to", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, { "name": "sketch_surface", "type": "SketchSurface", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSurface", "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([10, 10], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([-10, 23], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "startSketchAt", "summary": "Start a new 2-dimensional sketch at a given point on the 'XY' plane.", "description": "", "tags": [], "args": [ { "name": "data", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchAt([0, 0])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchAt([10, 10])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)", "exampleSketch = startSketchAt([-10, 23])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "startSketchOn", "summary": "Start a new 2-dimensional sketch on a specific plane or face.", "description": "", "tags": [], "args": [ { "name": "data", "type": "SketchData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchData", "description": "Data for start sketch on. You can start a sketch on a plane or an solid.", "anyOf": [ { "$ref": "#/components/schemas/PlaneData" }, { "$ref": "#/components/schemas/Solid" } ], "definitions": { "PlaneData": { "description": "Data for a plane.", "oneOf": [ { "description": "The XY plane.", "type": "string", "enum": [ "XY" ] }, { "description": "The opposite side of the XY plane.", "type": "string", "enum": [ "-XY" ] }, { "description": "The XZ plane.", "type": "string", "enum": [ "XZ" ] }, { "description": "The opposite side of the XZ plane.", "type": "string", "enum": [ "-XZ" ] }, { "description": "The YZ plane.", "type": "string", "enum": [ "YZ" ] }, { "description": "The opposite side of the YZ plane.", "type": "string", "enum": [ "-YZ" ] }, { "description": "A defined plane.", "type": "object", "required": [ "plane" ], "properties": { "plane": { "type": "object", "required": [ "origin", "xAxis", "yAxis", "zAxis" ], "properties": { "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] } } } }, "additionalProperties": false } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "FaceTag", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_FaceTag", "allOf": [ { "$ref": "#/components/schemas/FaceTag" } ], "nullable": true, "definitions": { "PlaneData": { "description": "Data for a plane.", "oneOf": [ { "description": "The XY plane.", "type": "string", "enum": [ "XY" ] }, { "description": "The opposite side of the XY plane.", "type": "string", "enum": [ "-XY" ] }, { "description": "The XZ plane.", "type": "string", "enum": [ "XZ" ] }, { "description": "The opposite side of the XZ plane.", "type": "string", "enum": [ "-XZ" ] }, { "description": "The YZ plane.", "type": "string", "enum": [ "YZ" ] }, { "description": "The opposite side of the YZ plane.", "type": "string", "enum": [ "-YZ" ] }, { "description": "A defined plane.", "type": "object", "required": [ "plane" ], "properties": { "plane": { "type": "object", "required": [ "origin", "xAxis", "yAxis", "zAxis" ], "properties": { "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] } } } }, "additionalProperties": false } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] }, "FaceTag": { "description": "A tag for a face.", "anyOf": [ { "$ref": "#/components/schemas/StartOrEnd" }, { "description": "A tag for the face.", "allOf": [ { "$ref": "#/components/schemas/TagIdentifier" } ] } ] }, "StartOrEnd": { "oneOf": [ { "description": "The start face as in before you extruded. This could also be known as the bottom face. But we do not call it bottom because it would be the top face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "start" ] }, { "description": "The end face after you extruded. This could also be known as the top face. But we do not call it top because it would be the bottom face if you extruded it in the opposite direction or flipped the camera.", "type": "string", "enum": [ "end" ] } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "SketchSurface", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSurface", "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ], "definitions": { "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XY\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)\n\nexampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([1, 1], %)\n |> line([8, 0], %)\n |> line([0, 8], %)\n |> line([-8, 0], %)\n |> close(%)\n\nexample002 = extrude(5, exampleSketch002)\n\nexampleSketch003 = startSketchOn(example002, 'end')\n |> startProfileAt([2, 2], %)\n |> line([6, 0], %)\n |> line([0, 6], %)\n |> line([-6, 0], %)\n |> close(%)\n\nexample003 = extrude(5, exampleSketch003)", "exampleSketch = startSketchOn(\"XY\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %, $sketchingFace)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)\n\nexampleSketch002 = startSketchOn(example, sketchingFace)\n |> startProfileAt([1, 1], %)\n |> line([8, 0], %)\n |> line([0, 8], %)\n |> line([-8, 0], %)\n |> close(%, $sketchingFace002)\n\nexample002 = extrude(10, exampleSketch002)\n\nexampleSketch003 = startSketchOn(example002, sketchingFace002)\n |> startProfileAt([-8, 12], %)\n |> line([0, 6], %)\n |> line([6, 0], %)\n |> line([0, -6], %)\n |> close(%)\n\nexample003 = extrude(5, exampleSketch003)", "exampleSketch = startSketchOn('XY')\n |> startProfileAt([4, 12], %)\n |> line([2, 0], %)\n |> line([0, -6], %)\n |> line([4, -6], %)\n |> line([0, -6], %)\n |> line([-3.75, -4.5], %)\n |> line([0, -5.5], %)\n |> line([-2, 0], %)\n |> close(%)\n\nexample = revolve({ axis: 'y', angle: 180 }, exampleSketch)\n\nexampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([4.5, -5], %)\n |> line([0, 5], %)\n |> line([5, 0], %)\n |> line([0, -5], %)\n |> close(%)\n\nexample002 = extrude(5, exampleSketch002)", "a1 = startSketchOn({\n plane: {\n origin: { x: 0, y: 0, z: 0 },\n xAxis: { x: 1, y: 0, z: 0 },\n yAxis: { x: 0, y: 1, z: 0 },\n zAxis: { x: 0, y: 0, z: 1 }\n }\n })\n |> startProfileAt([0, 0], %)\n |> line([100.0, 0], %)\n |> yLine(-100.0, %)\n |> xLine(-100.0, %)\n |> yLine(100.0, %)\n |> close(%)\n |> extrude(3.14, %)" ] }, { "name": "tan", "summary": "Compute the tangent of a number (in radians).", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 50, length: 50 * tan(1 / 2) }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "tangentialArc", "summary": "Draw a curved line segment along part of an imaginary circle.", "description": "The arc is constructed such that the last line segment is placed tangent to the imaginary circle of the specified radius. The resulting arc is the segment of the imaginary circle from that tangent point for 'offset' degrees along the imaginary circle.", "tags": [], "args": [ { "name": "data", "type": "TangentialArcData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "TangentialArcData", "description": "Data to draw a tangential arc.", "anyOf": [ { "type": "object", "required": [ "offset", "radius" ], "properties": { "radius": { "description": "Radius of the arc. Not to be confused with Raiders of the Lost Ark.", "type": "number", "format": "double" }, "offset": { "description": "Offset of the arc, in degrees.", "type": "number", "format": "double" } } } ] }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> tangentialArc({ radius: 10, offset: -120 }, %)\n |> angledLine({ angle: -60, length: 10 }, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "tangentialArcTo", "summary": "Starting at the current sketch's origin, draw a curved line segment along", "description": "some part of an imaginary circle until it reaches the desired (x, y) coordinates.", "tags": [], "args": [ { "name": "to", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> tangentialArcTo([15, 15], %)\n |> line([10, -15], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "tangentialArcToRelative", "summary": "Starting at the current sketch's origin, draw a curved line segment along", "description": "some part of an imaginary circle until it reaches a point the given (x, y) distance away.", "tags": [], "args": [ { "name": "delta", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 45, length: 10 }, %)\n |> tangentialArcToRelative([0, -10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "tau", "summary": "Return the value of `tau`. The full circle constant (τ). Equal to 2π.", "description": "", "tags": [ "math" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 50, length: 10 * tau() }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "toDegrees", "summary": "Converts a number from radians to degrees.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 50,\n length: 70 * cos(toDegrees(pi() / 4))\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "toRadians", "summary": "Converts a number from degrees to radians.", "description": "", "tags": [ "math" ], "args": [ { "name": "num", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true } ], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle: 50,\n length: 70 * cos(toRadians(45))\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "xLine", "summary": "Draw a line relative to the current origin to a specified distance away", "description": "from the current position along the 'x' axis.", "tags": [], "args": [ { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> xLine(15, %)\n |> angledLine({ angle: 80, length: 15 }, %)\n |> line([8, -10], %)\n |> xLine(10, %)\n |> angledLine({ angle: 120, length: 30 }, %)\n |> xLine(-15, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "xLineTo", "summary": "Draw a line parallel to the X axis, that ends at the given X.", "description": "E.g. if the previous line ended at (1, 1), then xLineTo(4) draws a line from (1, 1) to (4, 1)", "tags": [], "args": [ { "name": "to", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> xLineTo(15, %)\n |> angledLine({ angle: 80, length: 15 }, %)\n |> line([8, -10], %)\n |> xLineTo(40, %)\n |> angledLine({ angle: 135, length: 30 }, %)\n |> xLineTo(10, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "yLine", "summary": "Draw a line relative to the current origin to a specified distance away", "description": "from the current position along the 'y' axis.", "tags": [], "args": [ { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> yLine(15, %)\n |> angledLine({ angle: 30, length: 15 }, %)\n |> line([8, -10], %)\n |> yLine(-5, %)\n |> close(%)\n\nexample = extrude(10, exampleSketch)" ] }, { "name": "yLineTo", "summary": "Draw a line parallel to the Y axis, that ends at the given Y.", "description": "E.g. if the previous line ended at (1, 1), then yLineTo(4) draws a line from (1, 1) to (1, 4)", "tags": [], "args": [ { "name": "to", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, { "name": "tag", "type": "TagDeclarator", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_TagDeclarator", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": false } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "ToPoint" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment that goes to a point", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArcTo" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A arc that is tangential to the last path segment", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "TangentialArc" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "a complete arc", "type": "object", "required": [ "__geoMeta", "ccw", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Circle" ] }, "center": { "description": "the arc's center", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "the arc's radius", "type": "number", "format": "double" }, "ccw": { "description": "arc's direction", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A path that is horizontal.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "x" ], "properties": { "type": { "type": "string", "enum": [ "Horizontal" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "An angled line to.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "AngledLineTo" ] }, "x": { "description": "The x coordinate.", "type": "number", "format": "double", "nullable": true }, "y": { "description": "The y coordinate.", "type": "number", "format": "double", "nullable": true }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Base" ] }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, { "description": "A circular arc, not necessarily tangential to the current point.", "type": "object", "required": [ "__geoMeta", "center", "from", "radius", "to", "type" ], "properties": { "type": { "type": "string", "enum": [ "Arc" ] }, "center": { "description": "Center of the circle that this arc is drawn on.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "radius": { "description": "Radius of the circle that this arc is drawn on.", "type": "number", "format": "double" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "end", "start", "value" ], "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } }, "GeoMeta": { "description": "Geometry metadata.", "type": "object", "required": [ "id", "sourceRange" ], "properties": { "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "SourceRange": { "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 2, "minItems": 2 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "description": "A plane.", "type": "object", "required": [ "__meta", "id", "origin", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "value": { "$ref": "#/components/schemas/PlaneType" }, "origin": { "description": "Origin of the plane.", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "xAxis": { "description": "What should the plane’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the plane’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, { "description": "A face.", "type": "object", "required": [ "__meta", "id", "solid", "type", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "value": { "description": "The tag of the face.", "type": "string" }, "xAxis": { "description": "What should the face’s X axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "yAxis": { "description": "What should the face’s Y axis be?", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "zAxis": { "description": "The z-axis (normal).", "allOf": [ { "$ref": "#/components/schemas/Point3d" } ] }, "solid": { "description": "The solid the face is on.", "allOf": [ { "$ref": "#/components/schemas/Solid" } ] }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Metadata": { "description": "Metadata.", "type": "object", "required": [ "sourceRange" ], "properties": { "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, "Solid": { "description": "An solid is a collection of extrude surfaces.", "type": "object", "required": [ "__meta", "height", "id", "sketch", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "value": { "description": "The extrude surfaces.", "type": "array", "items": { "$ref": "#/components/schemas/ExtrudeSurface" } }, "sketch": { "description": "The sketch.", "allOf": [ { "$ref": "#/components/schemas/Sketch" } ] }, "height": { "description": "The height of the solid.", "type": "number", "format": "double" }, "startCapId": { "description": "The id of the extrusion start cap", "type": "string", "format": "uuid", "nullable": true }, "endCapId": { "description": "The id of the extrusion end cap", "type": "string", "format": "uuid", "nullable": true }, "edgeCuts": { "description": "Chamfers or fillets on this solid.", "type": "array", "items": { "$ref": "#/components/schemas/EdgeCut" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "ExtrudeSurface": { "description": "An extrude surface.", "oneOf": [ { "description": "An extrude plane.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudePlane" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "An extruded arc.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "extrudeArc" ] }, "faceId": { "description": "The face id for the extrude plane.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "faceId": { "description": "The id for the chamfer surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } }, { "description": "Geometry metadata.", "type": "object", "required": [ "faceId", "id", "sourceRange", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "faceId": { "description": "The id for the fillet surface.", "type": "string", "format": "uuid" }, "tag": { "description": "The tag.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "id": { "description": "The id of the geometry.", "type": "string", "format": "uuid" }, "sourceRange": { "description": "The source range.", "allOf": [ { "$ref": "#/components/schemas/SourceRange" } ] } } } ] }, "Sketch": { "description": "A sketch is a collection of paths.", "type": "object", "required": [ "__meta", "id", "on", "paths", "start" ], "properties": { "id": { "description": "The id of the sketch (this will change when the engine's reference to it changes).", "type": "string", "format": "uuid" }, "paths": { "description": "The paths in the sketch.", "type": "array", "items": { "$ref": "#/components/schemas/Path" } }, "on": { "description": "What the sketch is on (can be a plane or a face).", "allOf": [ { "$ref": "#/components/schemas/SketchSurface" } ] }, "start": { "description": "The starting path.", "allOf": [ { "$ref": "#/components/schemas/BasePath" } ] }, "tags": { "description": "Tag identifiers that have been declared in this sketch.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TagIdentifier" } }, "__meta": { "description": "Metadata.", "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to" ], "properties": { "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } }, "TagIdentifier": { "type": "object", "required": [ "__meta", "value" ], "properties": { "value": { "type": "string" }, "info": { "allOf": [ { "$ref": "#/components/schemas/TagEngineInfo" } ], "nullable": true }, "__meta": { "type": "array", "items": { "$ref": "#/components/schemas/Metadata" } } } }, "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", "required": [ "id", "sketch" ], "properties": { "id": { "description": "The id of the tagged object.", "type": "string", "format": "uuid" }, "sketch": { "description": "The sketch the tag is on.", "type": "string", "format": "uuid" }, "path": { "description": "The path the tag is on.", "allOf": [ { "$ref": "#/components/schemas/Path" } ], "nullable": true }, "surface": { "description": "The surface information for the tag.", "allOf": [ { "$ref": "#/components/schemas/ExtrudeSurface" } ], "nullable": true } } }, "EdgeCut": { "description": "A fillet or a chamfer.", "oneOf": [ { "description": "A fillet.", "type": "object", "required": [ "edgeId", "id", "radius", "type" ], "properties": { "type": { "type": "string", "enum": [ "fillet" ] }, "id": { "description": "The id of the engine command that called this fillet.", "type": "string", "format": "uuid" }, "radius": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to fillet.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } }, { "description": "A chamfer.", "type": "object", "required": [ "edgeId", "id", "length", "type" ], "properties": { "type": { "type": "string", "enum": [ "chamfer" ] }, "id": { "description": "The id of the engine command that called this chamfer.", "type": "string", "format": "uuid" }, "length": { "type": "number", "format": "double" }, "edgeId": { "description": "The engine id of the edge to chamfer.", "type": "string", "format": "uuid" }, "tag": { "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true } } } ] } } }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 50, length: 45 }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nexample = extrude(5, exampleSketch)" ] }, { "name": "yd", "summary": "Yards conversion factor for current projects units.", "description": "No matter what units the current project uses, this function will always return the conversion factor to yards.\n\nFor example, if the current project uses inches, this function will return `36`. If the current project uses millimeters, this function will return `914.4`. If the current project uses yards, this function will return `1`.\n\n**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.\n\nWe merely provide these functions for convenience and readability, as `10 * yd()` is more readable that your intent is \"I want 10 yards\" than `10 * 914.4`, if the project settings are in millimeters.", "tags": [ "units" ], "args": [], "returnValue": { "name": "", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double" }, "required": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * yd()" ] } ]