[ { "name": "abs", "summary": "Compute the absolute value of a number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "myAngle = -120\n\nsketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [8, 0])\n |> angledLine({ angle = abs(myAngle), length = 5 }, %)\n |> line(end = [-5, 0])\n |> angledLine({ angle = myAngle, length = 5 }, %)\n |> close()\n\nbaseExtrusion = extrude(sketch001, length = 5)" ] }, { "name": "acos", "summary": "Compute the arccosine of a number (in radians).", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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(end = [5, 0])\n |> line(endAbsolute = [12, 0])\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "name": "angleToMatchLengthX", "summary": "Returns the angle to match the given length for x.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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" }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [2, 5], tag = $seg01)\n |> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %)\n |> close()\n\nextrusion = extrude(sketch001, length = 5)" ] }, { "name": "angleToMatchLengthY", "summary": "Returns the angle to match the given length for y.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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" }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [1, 2], tag = $seg01)\n |> angledLine({\n angle = angleToMatchLengthY(seg01, 15, %),\n length = 5\n }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nextrusion = extrude(sketch001, length = 5)" ] }, { "name": "angledLine", "summary": "Draw a line segment relative to the current origin using the polar measure of some angle and distance.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> yLine(endAbsolute = 15)\n |> angledLine({ angle = 30, length = 15 }, %)\n |> line(end = [8, -10])\n |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "angledLineOfXLength", "summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(end = [0, -5])\n |> close(tag = $edge3)\n\nextrusion = extrude(sketch001, length = 10)" ] }, { "name": "angledLineOfYLength", "summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> angledLineOfYLength({ angle = 45, length = 10 }, %)\n |> line(end = [0, 10])\n |> angledLineOfYLength({ angle = 135, length = 10 }, %)\n |> line(end = [-10, 0])\n |> line(end = [0, -30])\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "angledLineThatIntersects", "summary": "Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "TagIdentifier": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(endAbsolute = [5, 10])\n |> line(endAbsolute = [-10, 10], tag = $lineToIntersect)\n |> line(endAbsolute = [0, 20])\n |> angledLineThatIntersects({\n angle = 80,\n intersectTag = lineToIntersect,\n offset = 10\n }, %)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "angledLineToX", "summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLineToX({ angle = 30, to = 10 }, %)\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "angledLineToY", "summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLineToY({ angle = 60, to = 20 }, %)\n |> line(end = [-20, 0])\n |> angledLineToY({ angle = 70, to = 10 }, %)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "appearance", "summary": "Set the appearance of a solid. This only works on solids, not sketches or individual paths.", "description": "This will work on any solid, including extruded solids, revolved solids, and shelled solids.", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid(s) whose appearance is being set", "labelRequired": false }, { "name": "color", "type": "String", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Color of the new material, a hex string like '#ff0000'", "labelRequired": true }, { "name": "metalness", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Metalness of the new material, a percentage like 95.7.", "labelRequired": true }, { "name": "roughness", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Roughness of the new material, a percentage like 95.7.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Add color to an extruded solid.\nexampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(endAbsolute = [10, 0])\n |> line(endAbsolute = [0, 10])\n |> line(endAbsolute = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n // There are other options besides 'color', but they're optional.\n |> appearance(color = '#ff0000')", "// Add color to a revolved solid.\nsketch001 = startSketchOn(XY)\n |> circle(center = [15, 0], radius = 5)\n |> revolve(angle = 360, axis = 'y')\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)", "// Add color to different solids.\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\nexample0 = cube([0, 0])\nexample1 = cube([20, 0])\nexample2 = cube([40, 0])\n\nappearance(\n [example0, example1],\n color = '#ff0000',\n metalness = 50,\n roughness = 50,\n)\nappearance(\n example2,\n color = '#00ff00',\n metalness = 50,\n roughness = 50,\n)", "// You can set the appearance before or after you shell it will yield the same result.\n// This example shows setting the appearance _after_ the shell.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n\nshell(firstSketch, faces = ['end'], thickness = 0.25)\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)", "// You can set the appearance before or after you shell it will yield the same result.\n// This example shows setting the appearance _before_ the shell.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)\n\nshell(firstSketch, faces = ['end'], thickness = 0.25)", "// Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.\n// This example shows _before_ the pattern.\nexampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 2])\n |> line(end = [3, 1])\n |> line(end = [0, -4])\n |> close()\n\nexample = extrude(exampleSketch, length = 1)\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)\n |> patternLinear3d(axis = [1, 0, 1], instances = 7, distance = 6)", "// Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.\n// This example shows _after_ the pattern.\nexampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 2])\n |> line(end = [3, 1])\n |> line(end = [0, -4])\n |> close()\n\nexample = extrude(exampleSketch, length = 1)\n |> patternLinear3d(axis = [1, 0, 1], instances = 7, distance = 6)\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)", "// Color the result of a 2D pattern that was extruded.\nexampleSketch = startSketchOn(XZ)\n |> startProfileAt([.5, 25], %)\n |> line(end = [0, 5])\n |> line(end = [-1, 0])\n |> line(end = [0, -5])\n |> close()\n |> patternCircular2d(\n center = [0, 0],\n instances = 13,\n arcDegrees = 360,\n rotateDuplicates = true,\n )\n\nexample = extrude(exampleSketch, length = 1)\n |> appearance(color = '#ff0000', metalness = 90, roughness = 90)", "// Color the result of a sweep.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> appearance(color = \"#ff0000\", metalness = 50, roughness = 50)" ] }, { "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": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> arc({\n angleStart = 0,\n angleEnd = 280,\n radius = 16\n }, %)\n |> close()\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "arcTo", "summary": "Draw a three point arc.", "description": "The arc is constructed such that the start point is the current position of the sketch and two more points defined as the end and interior point. The interior point is placed between the start point and end point. The radius of the arc will be controlled by how far the interior point is placed from the start and end.", "tags": [], "keywordArguments": false, "args": [ { "name": "data", "type": "ArcToData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "ArcToData", "description": "Data to draw a three point arc (arcTo).", "type": "object", "required": [ "end", "interior" ], "properties": { "end": { "description": "End point of the arc. A point in 3D space", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "interior": { "description": "Interior point of the arc. A point in 3D space", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> arcTo({ end = [10, 0], interior = [5, 5] }, %)\n |> close()\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "asin", "summary": "Compute the arcsine of a number (in radians).", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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 |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "name": "assert", "summary": "Check a value at runtime, and raise an error if the argument provided is false.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, otherwise raise an error.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, otherwise raise an error.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, otherwise raise an error.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, otherwise raise an error.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, otherwise raise an error.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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 |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "name": "atan2", "summary": "Compute the four quadrant arctangent of Y and X (in radians).", "description": "", "tags": [ "math" ], "keywordArguments": false, "args": [ { "name": "y", "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, "includeInSnippet": true, "labelRequired": true }, { "name": "x", "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLine({\n angle = toDegrees(atan2(1.25, 2)),\n length = 20\n }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "name": "bezierCurve", "summary": "Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 10])\n |> bezierCurve({\n to = [10, 10],\n control1 = [5, 0],\n control2 = [5, 10]\n }, %)\n |> line(endAbsolute = [10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "ceil", "summary": "Compute the smallest integer greater than or equal to a number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(endAbsolute = [12, 10])\n |> line(end = [ceil(7.02986), 0])\n |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "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": [], "keywordArguments": true, "args": [ { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The solid whose edges should be chamfered", "labelRequired": false }, { "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", "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The length of the chamfer", "labelRequired": true }, { "name": "tags", "type": "[EdgeReference]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_EdgeReference", "type": "array", "items": { "$ref": "#/components/schemas/EdgeReference" }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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" } ] } ] } } }, "required": true, "includeInSnippet": true, "description": "The paths you want to chamfer", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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" } ] } ] } } }, "required": false, "description": "Create a new tag which refers to this chamfer", "labelRequired": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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 |> line(endAbsolute = [width / 2, -length / 2], tag = $edge1)\n |> line(endAbsolute = [width / 2, length / 2], tag = $edge2)\n |> line(endAbsolute = [-width / 2, length / 2], tag = $edge3)\n |> close(tag = $edge4)\n\nmountingPlate = extrude(mountingPlateSketch, length = thickness)\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(end = [0, scale])\n |> line(end = [scale, 0])\n |> line(end = [0, -scale])\n\n return sg\n}\n\npart001 = cube([0, 0], 20)\n |> close(tag = $line1)\n |> extrude(length = 20)\n // We tag the chamfer to reference it later.\n |> chamfer(length = 10, tags = [getOppositeEdge(line1)], tag = $chamfer1)\n\nsketch001 = startSketchOn(part001, chamfer1)\n |> startProfileAt([10, 10], %)\n |> line(end = [2, 0])\n |> line(end = [0, 2])\n |> line(end = [-2, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n |> extrude(length = 10)" ] }, { "name": "circleThreePoint", "summary": "Construct a circle derived from 3 points.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketchSurfaceOrGroup", "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Plane or surface to sketch on.", "labelRequired": false }, { "name": "p1", "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, "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "1st point to derive the circle.", "labelRequired": true }, { "name": "p2", "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, "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "2nd point to derive the circle.", "labelRequired": true }, { "name": "p3", "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, "definitions": { "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "3rd point to derive the circle.", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Identifier for the circle to reference elsewhere.", "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XY)\n |> circleThreePoint(p1 = [10, 10], p2 = [20, 8], p3 = [15, 5])\n |> extrude(length = 5)" ] }, { "name": "close", "summary": "Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The sketch you want to close", "labelRequired": false }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Create a new tag which refers to this line", "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 10])\n |> line(end = [10, 0])\n |> close()\n |> extrude(length = 10)", "exampleSketch = startSketchOn(-XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * cm()" ] }, { "name": "e", "summary": "Return the value of Euler’s number `e`.", "description": "**DEPRECATED** use the constant E", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle = 30, length = 2 * e() ^ 2 }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "extrude", "summary": "Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.", "description": "You can provide more than one sketch to extrude, and they will all be extruded in the same direction.", "tags": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "Which sketch or sketches should be extruded", "labelRequired": false }, { "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", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "How far to extrude the given sketches", "labelRequired": true }, { "name": "tagStart", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "A named tag for the face at the start of the extrusion, i.e. the original sketch", "labelRequired": true }, { "name": "tagEnd", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "example = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> arc({\n angleStart = 120,\n angleEnd = 0,\n radius = 5\n }, %)\n |> line(end = [5, 0])\n |> line(end = [0, 10])\n |> bezierCurve({\n control1 = [-10, 0],\n control2 = [2, 10],\n to = [-5, 10]\n }, %)\n |> line(end = [-5, -2])\n |> close()\n |> extrude(length = 10)", "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([-10, 0], %)\n |> arc({\n angleStart = 120,\n angleEnd = -60,\n radius = 5\n }, %)\n |> line(end = [10, 0])\n |> line(end = [5, 0])\n |> bezierCurve({\n control1 = [-3, 0],\n control2 = [2, 10],\n to = [-5, 10]\n }, %)\n |> line(end = [-4, 10])\n |> line(end = [-5, -2])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "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": [], "keywordArguments": true, "args": [ { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The solid whose edges should be filletted", "labelRequired": false }, { "name": "radius", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The radius of the fillet", "labelRequired": true }, { "name": "tags", "type": "[EdgeReference]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_EdgeReference", "type": "array", "items": { "$ref": "#/components/schemas/EdgeReference" }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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" } ] } ] } } }, "required": true, "includeInSnippet": true, "description": "The paths you want to fillet", "labelRequired": true }, { "name": "tolerance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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" } ] } ] } } }, "required": false, "description": "The tolerance for this fillet", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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" } ] } ] } } }, "required": false, "description": "Create a new tag which refers to this fillet", "labelRequired": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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 |> line(endAbsolute = [width / 2, -length / 2], tag = $edge1)\n |> line(endAbsolute = [width / 2, length / 2], tag = $edge2)\n |> line(endAbsolute = [-width / 2, length / 2], tag = $edge3)\n |> close(tag = $edge4)\n\nmountingPlate = extrude(mountingPlateSketch, length = thickness)\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 |> line(endAbsolute = [width / 2, -length / 2], tag = $edge1)\n |> line(endAbsolute = [width / 2, length / 2], tag = $edge2)\n |> line(endAbsolute = [-width / 2, length / 2], tag = $edge3)\n |> close(tag = $edge4)\n\nmountingPlate = extrude(mountingPlateSketch, length = thickness)\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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(endAbsolute = [12, 10])\n |> line(end = [floor(7.02986), 0])\n |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * ft()" ] }, { "name": "getCommonEdge", "summary": "Get the shared edge between two faces.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "faces", "type": "[TagIdentifier]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_TagIdentifier", "type": "array", "items": { "$ref": "#/components/schemas/TagIdentifier" }, "definitions": { "TagIdentifier": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The tags of the faces you want to find the common edge between", "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Get an edge shared between two faces, created after a chamfer.\n\n\nscale = 20\npart001 = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, scale])\n |> line(end = [scale, 0])\n |> line(end = [0, -scale])\n |> close(tag = $line0)\n |> extrude(length = 20, tagEnd = $end0)\n // We tag the chamfer to reference it later.\n |> chamfer(length = 10, tags = [getOppositeEdge(line0)], tag = $chamfer0)\n\n// Get the shared edge between the chamfer and the extrusion.\ncommonEdge = getCommonEdge(faces = [chamfer0, end0])\n\n// Chamfer the shared edge.\n// TODO: uncomment this when ssi for fillets lands\n// chamfer(part001, length = 5, tags = [commonEdge])" ] }, { "name": "getNextAdjacentEdge", "summary": "Get the next adjacent edge to the edge given.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> angledLine({ angle = 60, length = 10 }, %)\n |> angledLine({ angle = 120, length = 10 }, %)\n |> line(end = [-10, 0])\n |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getNextAdjacentEdge(referenceEdge)])" ] }, { "name": "getOppositeEdge", "summary": "Get the opposite edge to the edge given.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> angledLine({ angle = 60, length = 10 }, %)\n |> angledLine({ angle = 120, length = 10 }, %)\n |> line(end = [-10, 0])\n |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getOppositeEdge(referenceEdge)])" ] }, { "name": "getPreviousAdjacentEdge", "summary": "Get the previous adjacent edge to the edge given.", "description": "", "tags": [], "keywordArguments": false, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> angledLine({ angle = 60, length = 10 }, %)\n |> angledLine({ angle = 120, length = 10 }, %)\n |> line(end = [-10, 0])\n |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getPreviousAdjacentEdge(referenceEdge)])" ] }, { "name": "helix", "summary": "Create a helix.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "revolutions", "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, "includeInSnippet": true, "description": "Number of revolutions.", "labelRequired": true }, { "name": "angleStart", "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, "includeInSnippet": true, "description": "Start angle (in degrees).", "labelRequired": true }, { "name": "ccw", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true }, "required": false, "description": "Is the helix rotation counter clockwise? The default is `false`.", "labelRequired": true }, { "name": "radius", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true }, "required": false, "includeInSnippet": true, "description": "Radius of the helix.", "labelRequired": true }, { "name": "axis", "type": "Axis3dOrEdgeReference", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Axis3dOrEdgeReference", "allOf": [ { "$ref": "#/components/schemas/Axis3dOrEdgeReference" } ], "nullable": true, "definitions": { "Axis3dOrEdgeReference": { "description": "A 3D axis or tagged edge.", "anyOf": [ { "description": "3D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin3d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin3d": { "description": "A 3D axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Z-axis.", "type": "string", "enum": [ "Z" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "description": "Flip the Z-axis.", "type": "string", "enum": [ "-Z" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 } } } }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "includeInSnippet": true, "description": "Axis to use for the helix.", "labelRequired": true }, { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Axis3dOrEdgeReference": { "description": "A 3D axis or tagged edge.", "anyOf": [ { "description": "3D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin3d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin3d": { "description": "A 3D axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Z-axis.", "type": "string", "enum": [ "Z" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "description": "Flip the Z-axis.", "type": "string", "enum": [ "-Z" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 } } } }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "includeInSnippet": true, "description": "Length of the helix. This is not necessary if the helix is created around an edge. If not given the length of the edge is used.", "labelRequired": true }, { "name": "cylinder", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Solid", "allOf": [ { "$ref": "#/components/schemas/Solid" } ], "nullable": true, "definitions": { "Axis3dOrEdgeReference": { "description": "A 3D axis or tagged edge.", "anyOf": [ { "description": "3D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin3d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin3d": { "description": "A 3D axis and origin.", "oneOf": [ { "description": "X-axis.", "type": "string", "enum": [ "X" ] }, { "description": "Y-axis.", "type": "string", "enum": [ "Y" ] }, { "description": "Z-axis.", "type": "string", "enum": [ "Z" ] }, { "description": "Flip the X-axis.", "type": "string", "enum": [ "-X" ] }, { "description": "Flip the Y-axis.", "type": "string", "enum": [ "-Y" ] }, { "description": "Flip the Z-axis.", "type": "string", "enum": [ "-Z" ] }, { "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "object", "required": [ "axis", "origin" ], "properties": { "axis": { "description": "The axis.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 }, "origin": { "description": "The origin.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3 } } } }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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, "description": "Cylinder to create the helix on.", "labelRequired": true } ], "returnValue": { "name": "", "type": "HelixValue", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Helix", "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Create a helix around the Z axis.\nhelixPath = helix(\n angleStart = 0,\n ccw = true,\n revolutions = 5,\n length = 10,\n radius = 5,\n axis = 'Z',\n)\n\n// Create a spring by sweeping around the helix path.\nspringSketch = startSketchOn(YZ)\n |> circle(center = [0, 0], radius = 0.5)\n |> sweep(path = helixPath)", "// Create a helix around an edge.\nhelper001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 10], tag = $edge001)\n\nhelixPath = helix(\n angleStart = 0,\n ccw = true,\n revolutions = 5,\n length = 10,\n radius = 5,\n axis = edge001,\n)\n\n// Create a spring by sweeping around the helix path.\nspringSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 0.5)\n |> sweep(path = helixPath)", "// Create a helix around a custom axis.\nhelixPath = helix(\n angleStart = 0,\n ccw = true,\n revolutions = 5,\n length = 10,\n radius = 5,\n axis = {\n custom = {\n axis = [0, 0, 1.0],\n origin = [0, 0.25, 0]\n }\n },\n)\n\n// Create a spring by sweeping around the helix path.\nspringSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1)\n |> sweep(path = helixPath)", "// Create a helix on a cylinder.\n\n\npart001 = startSketchOn(XY)\n |> circle(center = [5, 5], radius = 10)\n |> extrude(length = 10)\n\nhelix(\n angleStart = 0,\n ccw = true,\n revolutions = 16,\n cylinder = part001,\n)" ] }, { "name": "hole", "summary": "Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.", "description": "", "tags": [], "keywordArguments": false, "args": [ { "name": "holeSketch", "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 5])\n |> line(end = [5, 0])\n |> line(end = [0, -5])\n |> close()\n |> hole(circle(center = [1, 1], radius = .25), %)\n |> hole(circle(center = [1, 4], radius = .25), %)\n\nexample = extrude(exampleSketch, length = 1)", "fn squareHoleSketch() {\n squareSketch = startSketchOn(-XZ)\n |> startProfileAt([-1, -1], %)\n |> line(end = [2, 0])\n |> line(end = [0, 2])\n |> line(end = [-2, 0])\n |> close()\n return squareSketch\n}\n\nexampleSketch = startSketchOn(-XZ)\n |> circle(center = [0, 0], radius = 3)\n |> hole(squareHoleSketch(), %)\nexample = extrude(exampleSketch, length = 1)" ] }, { "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": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "solid", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Hollow a basic sketch.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n |> hollow(0.25, %)", "// Hollow a basic sketch.\nfirstSketch = startSketchOn(-XZ)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n |> hollow(0.5, %)", "// Hollow a sketch on face object.\nsize = 100\ncase = startSketchOn(-XZ)\n |> startProfileAt([-size, -size], %)\n |> line(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close()\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nthing2 = startSketchOn(case, 'end')\n |> circle(center = [size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nhollow(0.5, case)" ] }, { "name": "import", "summary": "Import a CAD file.", "description": "**DEPRECATED** Prefer to use import statements.\n\nFor 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": [], "keywordArguments": false, "args": [ { "name": "filePath", "type": "String", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "String", "type": "string" }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "format" ], "properties": { "format": { "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": [ "format" ], "properties": { "format": { "type": "string", "enum": [ "gltf" ] } } }, { "description": "Wavefront OBJ format.", "type": "object", "required": [ "format", "units" ], "properties": { "format": { "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": [ "format", "units" ], "properties": { "format": { "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": [ "format" ], "properties": { "format": { "type": "string", "enum": [ "sldprt" ] } } }, { "description": "ISO 10303-21 (STEP) format.", "type": "object", "required": [ "format" ], "properties": { "format": { "type": "string", "enum": [ "step" ] } } }, { "description": "ST**ereo**L**ithography format.", "type": "object", "required": [ "format", "units" ], "properties": { "format": { "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, "labelRequired": true } ], "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": [ "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" } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "model = import(\"tests/inputs/cube.obj\")", "model = import(\"tests/inputs/cube.obj\", { format = \"obj\", units = \"m\" })", "model = import(\"tests/inputs/cube.gltf\")", "model = import(\"tests/inputs/cube.sldprt\")", "model = import(\"tests/inputs/cube.step\")", "import height, buildSketch from \"common.kcl\"\n\nplane = XZ\nmargin = 2\ns1 = buildSketch(plane, [0, 0])\ns2 = buildSketch(plane, [0, height() + margin])" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * inch()" ] }, { "name": "int", "summary": "Convert a number to an integer.", "description": "DEPRECATED use floor(), ceil(), or round().", "tags": [ "convert" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "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(length = 5)\n |> patternTransform(\n instances = n,\n transform = fn(id) {\n return { translate = [4 * id, 0, 0] }\n },\n )" ] }, { "name": "intersect", "summary": "Intersect returns the shared volume between multiple solids, preserving only overlapping regions.", "description": "Intersect computes the geometric intersection of multiple solid bodies, returning a new solid representing the volume that is common to all input solids. This operation is useful for determining shared material regions, verifying fit, and analyzing overlapping geometries in assemblies.", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solids to intersect.", "labelRequired": false } ], "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "// Intersect two cubes using the stdlib functions.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = cube([8, 8])\n\nintersectedPart = intersect([part001, part002])", "// Intersect two cubes using operators.\n// NOTE: This will not work when using codemods through the UI.\n// Codemods will generate the stdlib function call instead.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = cube([8, 8])\n\n// This is the equivalent of: intersect([part001, part002])\nintersectedPart = part001 & part002" ] }, { "name": "lastSegX", "summary": "Extract the 'x' axis value of the last line segment in the provided 2-d sketch.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The sketch whose line segment is being queried", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [5, 0])\n |> line(end = [20, 5])\n |> line(end = [lastSegX(%), 0])\n |> line(end = [-15, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "lastSegY", "summary": "Extract the 'y' axis value of the last line segment in the provided 2-d sketch.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The sketch whose line segment is being queried", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [5, 0])\n |> line(end = [20, 5])\n |> line(end = [0, lastSegY(%)])\n |> line(end = [-15, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "legAngX", "summary": "Compute the angle of the given leg for x.", "description": "", "tags": [ "utilities" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "legAngX(5, 3)" ] }, { "name": "legAngY", "summary": "Compute the angle of the given leg for y.", "description": "", "tags": [ "utilities" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "legAngY(5, 3)" ] }, { "name": "legLen", "summary": "Compute the length of the given leg.", "description": "", "tags": [ "utilities" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "legLen(5, 3)" ] }, { "name": "line", "summary": "Extend the current sketch with a new straight line.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Which sketch should this path be added to?", "labelRequired": false }, { "name": "endAbsolute", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2, "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Which absolute point should this line go to? Incompatible with `end`.", "labelRequired": true }, { "name": "end", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Array_size_2_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2, "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`.", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Create a new tag which refers to this line", "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "triangle = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n // The 'end' argument means it ends at exactly [10, 0].\n // This is an absolute measurement, it is NOT relative to\n // the start of the sketch.\n |> line(endAbsolute = [10, 0])\n |> line(endAbsolute = [0, 10])\n |> line(endAbsolute = [-10, 0], tag = $thirdLineOfTriangle)\n |> close()\n |> extrude(length = 5)\n\nbox = startSketchOn(XZ)\n |> startProfileAt([10, 10], %)\n // The 'to' argument means move the pen this much.\n // So, [10, 0] is a relative distance away from the current point.\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0], tag = $thirdLineOfBox)\n |> close()\n |> extrude(length = 5)" ] }, { "name": "ln", "summary": "Compute the natural logarithm of the number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [ln(100), 15])\n |> line(end = [5, -6])\n |> line(end = [-10, -10])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "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": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "Which sketches to loft. Must include at least 2 sketches.", "labelRequired": false }, { "name": "vDegree", "type": "NonZeroU32", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "NonZeroU32", "type": "integer", "format": "uint32", "minimum": 1.0, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "bezApproximateRational", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Boolean", "type": "boolean", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "baseCurveIndex", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "This can be set to override the automatically determined topological base curve, which is usually the first section encountered.", "labelRequired": true }, { "name": "tolerance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "Tolerance for the loft operation.", "labelRequired": true }, { "name": "tagStart", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "A named tag for the face at the start of the loft, i.e. the original sketch", "labelRequired": true }, { "name": "tagEnd", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "A named tag for the face at the end of the loft, i.e. the last sketch", "labelRequired": true } ], "returnValue": { "name": "", "type": "Solid", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Solid", "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Loft a square and a triangle.\nsquareSketch = startSketchOn(XY)\n |> startProfileAt([-100, 200], %)\n |> line(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ntriangleSketch = startSketchOn(offsetPlane(XY, offset = 75))\n |> startProfileAt([0, 125], %)\n |> line(end = [-15, -30])\n |> line(end = [30, 0])\n |> line(endAbsolute = [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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch0 = startSketchOn(offsetPlane(XY, offset = 75))\n |> circle(center = [0, 100], radius = 50)\n\ncircleSketch1 = startSketchOn(offsetPlane(XY, offset = 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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch0 = startSketchOn(offsetPlane(XY, offset = 75))\n |> circle(center = [0, 100], radius = 50)\n\ncircleSketch1 = startSketchOn(offsetPlane(XY, offset = 150))\n |> circle(center = [0, 100], radius = 20)\n\nloft(\n [\n squareSketch,\n circleSketch0,\n circleSketch1\n ],\n baseCurveIndex = 0,\n bezApproximateRational = false,\n tolerance = 0.000001,\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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [log(100, 5), 0])\n |> line(end = [5, 8])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "log10", "summary": "Compute the base 10 logarithm of the number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [log10(100), 0])\n |> line(end = [5, 8])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "log2", "summary": "Compute the base 2 logarithm of the number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [log2(100), 0])\n |> line(end = [5, 8])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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": [], "keywordArguments": false, "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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "mapFn", "type": "FunctionSource", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionSource", "type": "null", "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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], fn(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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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(end = [20, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "min", "summary": "Compute the minimum of the given arguments.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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(end = [20, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "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": [], "keywordArguments": false, "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/Axis2dOrEdgeReference" } ] } }, "definitions": { "Axis2dOrEdgeReference": { "description": "A 2D axis or tagged edge.", "anyOf": [ { "description": "2D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin2d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin2d": { "description": "A 2D 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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "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": { "Axis2dOrEdgeReference": { "description": "A 2D axis or tagged edge.", "anyOf": [ { "description": "2D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin2d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ] }, "AxisAndOrigin2d": { "description": "A 2D 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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Mirror an un-closed sketch across the Y axis.\nsketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 10], %)\n |> line(end = [15, 0])\n |> line(end = [-7, -3])\n |> line(end = [9, -1])\n |> line(end = [-8, -5])\n |> line(end = [9, -3])\n |> line(end = [-8, -3])\n |> line(end = [9, -1])\n |> line(end = [-19, -0])\n |> mirror2d({ axis = 'Y' }, %)\n\nexample = extrude(sketch001, length = 10)", "// Mirror a un-closed sketch across the Y axis.\nsketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 8.5], %)\n |> line(end = [20, -8.5])\n |> line(end = [-20, -8.5])\n |> mirror2d({ axis = 'Y' }, %)\n\nexample = extrude(sketch001, length = 10)", "// Mirror a un-closed sketch across an edge.\nhelper001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 10], tag = $edge001)\n\nsketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 8.5], %)\n |> line(end = [20, -8.5])\n |> line(end = [-20, -8.5])\n |> mirror2d({ axis = edge001 }, %)\n\n// example = extrude(sketch001, length = 10)", "// Mirror an un-closed sketch across a custom axis.\nsketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 8.5], %)\n |> line(end = [20, -8.5])\n |> line(end = [-20, -8.5])\n |> mirror2d({\n axis = {\n custom = {\n axis = [0.0, 1.0],\n origin = [0.0, 0.0]\n }\n }\n }, %)\n\nexample = extrude(sketch001, length = 10)" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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": [], "keywordArguments": true, "args": [ { "name": "plane", "type": "PlaneData", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "PlaneData", "description": "Orientation data that can be used to construct a plane, not a plane in itself.", "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, "includeInSnippet": true, "description": "The plane (e.g. 'XY') which this new plane is created from.", "labelRequired": false }, { "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", "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, "includeInSnippet": true, "description": "Distance from the standard plane this new plane will be created at.", "labelRequired": true } ], "returnValue": { "name": "", "type": "Plane", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Plane", "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] } } }, "required": true, "includeInSnippet": true, "labelRequired": 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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = startSketchOn(offsetPlane(XY, offset = 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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = startSketchOn(offsetPlane(XZ, offset = 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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = startSketchOn(offsetPlane(YZ, offset = 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(end = [200, 0])\n |> line(end = [0, -200])\n |> line(end = [-200, 0])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = startSketchOn(offsetPlane(-XZ, offset = -150))\n |> circle(center = [0, 100], radius = 50)\n\nloft([squareSketch, circleSketch])", "// A circle on the XY plane\nstartSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> circle(radius = 10, center = [0, 0])\n\n// Triangle on the plane 4 units above\nstartSketchOn(offsetPlane(XY, offset = 4))\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> close()" ] }, { "name": "patternCircular2d", "summary": "Repeat a 2-dimensional sketch some number of times along a partial or 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.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketchSet", "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "Which sketch(es) to pattern", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "center", "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, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The center about which to make the pattern. This is a 2D vector.", "labelRequired": true }, { "name": "arcDegrees", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The arc angle (in degrees) to place the repetitions. Must be greater than 0.", "labelRequired": true }, { "name": "rotateDuplicates", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Boolean", "type": "boolean", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "Whether or not to rotate the duplicates as they are copied.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([.5, 25], %)\n |> line(end = [0, 5])\n |> line(end = [-1, 0])\n |> line(end = [0, -5])\n |> close()\n |> patternCircular2d(\n center = [0, 0],\n instances = 13,\n arcDegrees = 360,\n rotateDuplicates = true,\n )\n\nexample = extrude(exampleSketch, length = 1)" ] }, { "name": "patternCircular3d", "summary": "Repeat a 3-dimensional solid some number of times along a partial or 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.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Which solid(s) to pattern", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "axis", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_3_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The axis around which to make the pattern. This is a 3D vector", "labelRequired": true }, { "name": "center", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_3_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The center about which to make the pattern. This is a 3D vector.", "labelRequired": true }, { "name": "arcDegrees", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The arc angle (in degrees) to place the repetitions. Must be greater than 0.", "labelRequired": true }, { "name": "rotateDuplicates", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Boolean", "type": "boolean", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Whether or not to rotate the duplicates as they are copied.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> circle(center = [0, 0], radius = 1)\n\nexample = extrude(exampleSketch, length = -5)\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 of distance between each repetition, some specified number of times.", "description": "", "tags": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The sketch(es) to duplicate", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "distance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "Distance between each repetition. Also known as 'spacing'.", "labelRequired": true }, { "name": "axis", "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, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The axis of the pattern. A 2D vector.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> circle(center = [0, 0], radius = 1)\n |> patternLinear2d(axis = [1, 0], instances = 7, distance = 4)\n\nexample = extrude(exampleSketch, length = 1)" ] }, { "name": "patternLinear3d", "summary": "Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times.", "description": "///", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid(s) to duplicate", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "distance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "double", "type": "number", "format": "double", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Distance between each repetition. Also known as 'spacing'.", "labelRequired": true }, { "name": "axis", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_size_3_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The axis of the pattern. A 2D vector.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 2])\n |> line(end = [3, 1])\n |> line(end = [0, -4])\n |> close()\n\nexample = extrude(exampleSketch, length = 1)\n |> patternLinear3d(axis = [1, 0, 1], instances = 7, distance = 6)", "// Pattern a whole sketch on face.\nsize = 100\ncase = startSketchOn(XY)\n |> startProfileAt([-size, -size], %)\n |> line(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nthing2 = startSketchOn(case, 'end')\n |> circle(center = [size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\n // We pass in the \"case\" here since we want to pattern the whole sketch.\n// And the case was the base of the sketch.\npatternLinear3d(\n case,\n axis = [1, 0, 0],\n distance = 250,\n instances = 2,\n)", "// Pattern an object on a face.\nsize = 100\ncase = startSketchOn(XY)\n |> startProfileAt([-size, -size], %)\n |> line(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close(%)\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\n// We pass in `thing1` here with `useOriginal` since we want to pattern just this object on the face.\npatternLinear3d(\n thing1,\n axis = [1, 0, 0],\n distance = size,\n instances = 2,\n useOriginal = true,\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(instances = 4, transform = f)` 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": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid(s) to duplicate", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "transform", "type": "FunctionSource", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionSource", "type": "null", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "How each replica should be transformed. The 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.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(length = 5)\n |> patternTransform(instances = 4, transform = 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(length = 5)\n |> patternTransform(instances = 4, transform = 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 startSketchOn(XY)\n |> startProfileAt(p0, %)\n |> line(endAbsolute = p1)\n |> line(endAbsolute = p2)\n |> line(endAbsolute = p3)\n |> line(endAbsolute = p0)\n |> close()\n |> extrude(length = 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(instances = 25, transform = 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 startSketchOn(XY)\n |> startProfileAt(p0, %)\n |> line(endAbsolute = p1)\n |> line(endAbsolute = p2)\n |> line(endAbsolute = p3)\n |> line(endAbsolute = p0)\n |> close()\n |> extrude(length = 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(instances = 4, transform = 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, tag = $tag1)\n |> extrude(length = 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(instances = 100, transform = transform)", "fn transform(i) {\n // Transform functions can return multiple transforms. They'll be applied in order.\n return [\n { translate = [30 * i, 0, 0] },\n { rotation = { angle = 45 * i } }\n ]\n}\nstartSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> polygon({\n radius = 10,\n numSides = 4,\n center = [0, 0],\n inscribed = false\n }, %)\n |> extrude(length = 4)\n |> patternTransform(instances = 3, transform = transform)" ] }, { "name": "patternTransform2d", "summary": "Just like patternTransform, but works on 2D sketches not 3D solids.", "description": "", "tags": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The sketch(es) to duplicate", "labelRequired": false }, { "name": "instances", "type": "integer", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "uint32", "type": "integer", "format": "uint32", "minimum": 0.0, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "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.", "labelRequired": true }, { "name": "transform", "type": "FunctionSource", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionSource", "type": "null", "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "How each replica should be transformed. The 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.", "labelRequired": true }, { "name": "useOriginal", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": false, "description": "If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Each instance will be shifted along the X axis.\nfn transform(id) {\n return { translate = [4 * id, 0] }\n}\n\n// Sketch 4 circles.\nsketch001 = startSketchOn(XZ)\n |> circle(center = [0, 0], radius = 2)\n |> patternTransform2d(instances = 4, transform = transform)" ] }, { "name": "pi", "summary": "Return the value of `pi`. Archimedes’ constant (π).", "description": "**DEPRECATED** use the constant PI", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "circumference = 70\n\nexampleSketch = startSketchOn(XZ)\n |> circle(center = [0, 0], radius = circumference / (2 * pi()))\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "polar", "summary": "Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates.", "description": "", "tags": [], "keywordArguments": false, "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.", "allOf": [ { "$ref": "#/components/schemas/TyF64" } ] } }, "definitions": { "TyF64": { "type": "number", "format": "double" } } }, "required": true, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = polar({ angle = 30, length = 5 }), tag = $thing)\n |> line(end = [0, 5])\n |> line(end = [segEndX(thing), 0])\n |> line(end = [-20, 10])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "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": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketchSurfaceOrGroup", "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(hex, length = 5)", "// 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(square, length = 5)" ] }, { "name": "pop", "summary": "Remove the last element from an array.", "description": "Returns a new array with the last element removed.", "tags": [], "keywordArguments": true, "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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "description": "The array to pop from. Must not be empty.", "labelRequired": false } ], "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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ], "definitions": { "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "arr = [1, 2, 3, 4]\nnew_arr = pop(arr)\nassertEqual(new_arr[0], 1, 0.00001, \"1 is the first element of the array\")\nassertEqual(new_arr[1], 2, 0.00001, \"2 is the second element of the array\")\nassertEqual(new_arr[2], 3, 0.00001, \"3 is the third element of the array\")" ] }, { "name": "pow", "summary": "Compute the number to a power.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle = 50, length = pow(5, 2) }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "profileStart", "summary": "Extract the provided 2-dimensional sketch's profile's origin value.", "description": "", "tags": [], "keywordArguments": false, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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 |> line(end = profileStart(%))\n |> close()\n |> extrude(length = 20)" ] }, { "name": "profileStartX", "summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x' value.", "description": "", "tags": [], "keywordArguments": false, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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' value.", "description": "", "tags": [], "keywordArguments": false, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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": [], "keywordArguments": false, "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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ], "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ], "definitions": { "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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, using the previous value and the element.", "description": "", "tags": [], "keywordArguments": false, "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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ], "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, { "name": "reduceFn", "type": "FunctionSource", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "FunctionSource", "type": "null", "definitions": { "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": 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": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ], "definitions": { "NumericType": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Count" ] } } }, { "description": "A unit of length.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Length" ] } } }, { "description": "A unit of angle.", "type": "object", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Angle" ] } } } ], "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Known" ] } } }, { "type": "object", "required": [ "angle", "len", "type" ], "properties": { "type": { "type": "string", "enum": [ "Default" ] }, "len": { "$ref": "#/components/schemas/UnitLen" }, "angle": { "$ref": "#/components/schemas/UnitAngle" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Unknown" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Any" ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "UnitAngle": { "description": "A unit of angle.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Degrees" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Radians" ] } } } ] }, "KclValue": { "description": "Any KCL value.", "oneOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Uuid" ] }, "value": { "type": "string", "format": "uuid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Bool" ] }, "value": { "type": "boolean" } } }, { "type": "object", "required": [ "ty", "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Number" ] }, "value": { "type": "number", "format": "double" }, "ty": { "$ref": "#/components/schemas/NumericType" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "String" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "MixedArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "HomArray" ] }, "value": { "type": "array", "items": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Object" ] }, "value": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/KclValue" } } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagIdentifier" ] }, "value": { "type": "string" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "TagDeclarator" ] }, "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Plane" ] }, "value": { "$ref": "#/components/schemas/Plane" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Face" ] }, "value": { "$ref": "#/components/schemas/Face" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Sketch" ] }, "value": { "$ref": "#/components/schemas/Sketch" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Solid" ] }, "value": { "$ref": "#/components/schemas/Solid" } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Helix" ] }, "value": { "$ref": "#/components/schemas/Helix" } } }, { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Function" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "Module" ] }, "value": { "$ref": "#/components/schemas/ModuleId" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Type" ] } } }, { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "KclNone" ] }, "value": { "$ref": "#/components/schemas/KclNone" } } } ] }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Face": { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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 } } } ] }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ModuleId": { "description": "Identifier of a source file. Uses a u32 to keep the size small.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "KclNone": { "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", "properties": { "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true } } } } }, "required": true, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// This function adds two numbers.\nfn add(a, b) {\n return a + b\n}\n\n// This function adds an array of numbers.\n// It uses the `reduce` function, to call the `add` function on every\n// element of the `arr` parameter. The starting value is 0.\nfn sum(arr) {\n return reduce(arr, 0, add)\n}\n\n/* The above is basically like this pseudo-code:\nfn sum(arr):\n sumSoFar = 0\n for i in arr:\n sumSoFar = add(sumSoFar, i)\n return sumSoFar */\n\n// We use `assertEqual` to check that our `sum` function gives the\n// expected result. It's good to check your work!\nassertEqual(sum([1, 2, 3]), 6, 0.00001, \"1 + 2 + 3 summed is 6\")", "// This example works just like the previous example above, but it uses\n// an anonymous `add` function as its parameter, instead of declaring a\n// named function outside.\narr = [1, 2, 3]\nsum = reduce(arr, 0, fn(i, result_so_far) {\n return i + result_so_far\n})\n\n// We use `assertEqual` to check that our `sum` function gives the\n// expected result. It's good to check your work!\nassertEqual(sum, 6, 0.00001, \"1 + 2 + 3 summed is 6\")", "// Declare a function that sketches a decagon.\nfn decagon(radius) {\n // Each side of the decagon is turned this many degrees from the previous angle.\n stepAngle = 1 / 10 * TAU\n\n // Start the decagon sketch at this point.\n startOfDecagonSketch = startSketchOn(XY)\n |> startProfileAt([cos(0) * radius, sin(0) * radius], %)\n\n // Use a `reduce` to draw the remaining decagon sides.\n // For each number in the array 1..10, run the given function,\n // which takes a partially-sketched decagon and adds one more edge to it.\n fullDecagon = reduce([1..10], startOfDecagonSketch, fn(i, partialDecagon) {\n // Draw one edge of the decagon.\n x = cos(stepAngle * i) * radius\n y = sin(stepAngle * i) * radius\n return line(partialDecagon, end = [x, y])\n })\n\n return fullDecagon\n}\n\n/* The `decagon` above is basically like this pseudo-code:\nfn decagon(radius):\n stepAngle = (1/10) * TAU\n plane = startSketchOn('XY')\n startOfDecagonSketch = startProfileAt([(cos(0)*radius), (sin(0) * radius)], plane)\n\n // Here's the reduce part.\n partialDecagon = startOfDecagonSketch\n for i in [1..10]:\n x = cos(stepAngle * i) * radius\n y = sin(stepAngle * i) * radius\n partialDecagon = line(partialDecagon, end = [x, y])\n fullDecagon = partialDecagon // it's now full\n return fullDecagon */\n\n// Use the `decagon` function declared above, to sketch a decagon with radius 5.\ndecagon(5.0)\n |> close()" ] }, { "name": "rem", "summary": "Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too.", "description": "", "tags": [ "math" ], "keywordArguments": true, "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, "includeInSnippet": true, "description": "The number which will be divided by `divisor`.", "labelRequired": false }, { "name": "divisor", "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, "includeInSnippet": true, "description": "The number which will divide `num`.", "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "assertEqual(rem(7, divisor = 4), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(-7, divisor = 4), -3, 0.01, \"remainder is -3\")\nassertEqual(rem(7, divisor = -4), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(6, divisor = 2.5), 1, 0.01, \"remainder is 1\")\nassertEqual(rem(6.5, divisor = 2.5), 1.5, 0.01, \"remainder is 1.5\")\nassertEqual(rem(6.5, divisor = 2), 0.5, 0.01, \"remainder is 0.5\")" ] }, { "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.\n\nYou can provide more than one sketch to revolve, and they will all be revolved around the same axis.", "tags": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The sketch or set of sketches that should be revolved", "labelRequired": false }, { "name": "axis", "type": "Axis2dOrEdgeReference", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Axis2dOrEdgeReference", "description": "A 2D axis or tagged edge.", "anyOf": [ { "description": "2D axis and origin.", "allOf": [ { "$ref": "#/components/schemas/AxisAndOrigin2d" } ] }, { "description": "Tagged edge.", "allOf": [ { "$ref": "#/components/schemas/EdgeReference" } ] } ], "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "AxisAndOrigin2d": { "description": "A 2D 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" } ] } ] } } }, "required": true, "includeInSnippet": true, "description": "Axis of revolution.", "labelRequired": true }, { "name": "angle", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "AxisAndOrigin2d": { "description": "A 2D 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" } ] } ] } } }, "required": false, "description": "Angle to revolve (in degrees). Default is 360.", "labelRequired": true }, { "name": "tolerance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "AxisAndOrigin2d": { "description": "A 2D 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" } ] } ] } } }, "required": false, "description": "Tolerance for the revolve operation.", "labelRequired": true }, { "name": "tagStart", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "AxisAndOrigin2d": { "description": "A 2D 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" } ] } ] } } }, "required": false, "description": "A named tag for the face at the start of the revolve, i.e. the original sketch", "labelRequired": true }, { "name": "tagEnd", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "AxisAndOrigin2d": { "description": "A 2D 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" } ] } ] } } }, "required": false, "description": "A named tag for the face at the end of the revolve", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "part001 = startSketchOn(XY)\n |> startProfileAt([4, 12], %)\n |> line(end = [2, 0])\n |> line(end = [0, -6])\n |> line(end = [4, -6])\n |> line(end = [0, -6])\n |> line(end = [-3.75, -4.5])\n |> line(end = [0, -5.5])\n |> line(end = [-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(end = [2, 0])\n |> line(end = [0, -6])\n |> line(end = [4, -6])\n |> line(end = [0, -6])\n |> line(end = [-3.75, -4.5])\n |> line(end = [0, -5.5])\n |> line(end = [-2, 0])\n |> close()\n |> revolve(axis = 'y', angle = 180)", "part001 = startSketchOn(XY)\n |> startProfileAt([4, 12], %)\n |> line(end = [2, 0])\n |> line(end = [0, -6])\n |> line(end = [4, -6])\n |> line(end = [0, -6])\n |> line(end = [-3.75, -4.5])\n |> line(end = [0, -5.5])\n |> line(end = [-2, 0])\n |> close()\n |> revolve(axis = 'y', angle = 180)\n\npart002 = startSketchOn(part001, 'end')\n |> startProfileAt([4.5, -5], %)\n |> line(end = [0, 5])\n |> line(end = [5, 0])\n |> line(end = [0, -5])\n |> close()\n |> extrude(length = 5)", "box = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 20])\n |> line(end = [20, 0])\n |> line(end = [0, -20])\n |> close()\n |> extrude(length = 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(end = [0, 20])\n |> line(end = [20, 0])\n |> line(end = [0, -20], tag = $revolveAxis)\n |> close()\n |> extrude(length = 20)\n\nsketch001 = startSketchOn(box, \"END\")\n |> circle(center = [10, 10], radius = 4)\n |> revolve(angle = 90, axis = getOppositeEdge(revolveAxis))", "box = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 20])\n |> line(end = [20, 0])\n |> line(end = [0, -20], tag = $revolveAxis)\n |> close()\n |> extrude(length = 20)\n\nsketch001 = startSketchOn(box, \"END\")\n |> circle(center = [10, 10], radius = 4)\n |> revolve(angle = 90, axis = getOppositeEdge(revolveAxis), tolerance = 0.0001)", "sketch001 = startSketchOn(XY)\n |> startProfileAt([10, 0], %)\n |> line(end = [5, -5])\n |> line(end = [5, 5])\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\npart001 = revolve(\n sketch001,\n axis = {\n custom = {\n axis = [0.0, 1.0],\n origin = [0.0, 0.0]\n }\n },\n)", "// Revolve two sketches around the same axis.\n\n\nsketch001 = startSketchOn(XY)\nprofile001 = startProfileAt([4, 8], sketch001)\n |> xLine(length = 3)\n |> yLine(length = -3)\n |> xLine(length = -3)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\nprofile002 = startProfileAt([-5, 8], sketch001)\n |> xLine(length = 3)\n |> yLine(length = -3)\n |> xLine(length = -3)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\nrevolve([profile001, profile002], axis = \"X\")", "// Revolve around a path that has not been extruded.\n\n\nprofile001 = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 20], tag = $revolveAxis)\n |> line(end = [20, 0])\n |> line(end = [0, -20])\n |> close(%)\n\nsketch001 = startSketchOn(XY)\n |> circle(center = [-10, 10], radius = 4)\n |> revolve(angle = 90, axis = revolveAxis)", "// Revolve around a path that has not been extruded or closed.\n\n\nprofile001 = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 20], tag = $revolveAxis)\n |> line(end = [20, 0])\n\nsketch001 = startSketchOn(XY)\n |> circle(center = [-10, 10], radius = 4)\n |> revolve(angle = 90, axis = revolveAxis)" ] }, { "name": "rotate", "summary": "Rotate a solid or a sketch.", "description": "This is really useful for assembling parts together. You can create a part and then rotate it to the correct orientation.\n\nFor sketches, you can use this to rotate a sketch and then loft it with another sketch.\n\n### Using Roll, Pitch, and Yaw\n\nWhen rotating a part in 3D space, \"roll,\" \"pitch,\" and \"yaw\" refer to the three rotational axes used to describe its orientation: roll is rotation around the longitudinal axis (front-to-back), pitch is rotation around the lateral axis (wing-to-wing), and yaw is rotation around the vertical axis (up-down); essentially, it's like tilting the part on its side (roll), tipping the nose up or down (pitch), and turning it left or right (yaw).\n\nSo, in the context of a 3D model:\n\n- **Roll**: Imagine spinning a pencil on its tip - that's a roll movement.\n\n- **Pitch**: Think of a seesaw motion, where the object tilts up or down along its side axis.\n\n- **Yaw**: Like turning your head left or right, this is a rotation around the vertical axis\n\n### Using an Axis and Angle\n\nWhen rotating a part around an axis, you specify the axis of rotation and the angle of rotation.", "tags": [], "keywordArguments": true, "args": [ { "name": "objects", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid, sketch, or set of solids or sketches to rotate.", "labelRequired": false }, { "name": "roll", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The roll angle in degrees. Must be between -360 and 360. Default is 0 if not given.", "labelRequired": true }, { "name": "pitch", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The pitch angle in degrees. Must be between -360 and 360. Default is 0 if not given.", "labelRequired": true }, { "name": "yaw", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The yaw angle in degrees. Must be between -360 and 360. Default is 0 if not given.", "labelRequired": true }, { "name": "axis", "type": "[number]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Array_size_3_of_double", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 3, "minItems": 3, "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "The axis to rotate around. Must be used with `angle`.", "labelRequired": true }, { "name": "angle", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "The angle to rotate in degrees. Must be used with `axis`. Must be between -360 and 360.", "labelRequired": true }, { "name": "global", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move.", "labelRequired": true } ], "returnValue": { "name": "", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Rotate a pipe with roll, pitch, and yaw.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> rotate(roll = 10, pitch = 10, yaw = 90)", "// Rotate a pipe with just roll.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> rotate(roll = 10)", "// Rotate a pipe about an axis with an angle.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> rotate(axis = [0, 0, 1.0], angle = 90)", "// Rotate an imported model.\n\n\nimport \"tests/inputs/cube.sldprt\" as cube\n\ncube\n |> rotate(axis = [0, 0, 1.0], angle = 9)", "// Sweep two sketches along the same path.\n\n\nsketch001 = startSketchOn(XY)\nrectangleSketch = startProfileAt([-200, 23.86], sketch001)\n |> angledLine([0, 73.47], %, $rectangleSegmentA001)\n |> angledLine([\n segAng(rectangleSegmentA001) - 90,\n 50.61\n ], %)\n |> angledLine([\n segAng(rectangleSegmentA001),\n -segLen(rectangleSegmentA001)\n ], %)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)\n\nsketch002 = startSketchOn(YZ)\nsweepPath = startProfileAt([0, 0], sketch002)\n |> yLine(length = 231.81)\n |> tangentialArc({ radius = 80, offset = -90 }, %)\n |> xLine(length = 384.93)\n\nparts = sweep([rectangleSketch, circleSketch], path = sweepPath)\n\n// Rotate the sweeps.\nrotate(parts, axis = [0, 0, 1.0], angle = 90)", "// Translate and rotate a sketch to create a loft.\nsketch001 = startSketchOn(XY)\n\nfn square() {\n return startProfileAt([-10, 10], sketch001)\n |> xLine(length = 20)\n |> yLine(length = -20)\n |> xLine(length = -20)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n}\n\nprofile001 = square()\n\nprofile002 = square()\n |> translate(x = 0, y = 0, z = 20)\n |> rotate(axis = [0, 0, 1.0], angle = 45)\n\nloft([profile001, profile002])" ] }, { "name": "round", "summary": "Round a number to the nearest integer.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "sketch001 = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(endAbsolute = [12, 10])\n |> line(end = [round(7.02986), 0])\n |> yLine(endAbsolute = 0)\n |> close()\n\nextrude001 = extrude(sketch001, length = 5)" ] }, { "name": "scale", "summary": "Scale a solid or a sketch.", "description": "This is really useful for resizing parts. You can create a part and then scale it to the correct size.\n\nFor sketches, you can use this to scale a sketch and then loft it with another sketch.\n\nBy default the transform is applied in local sketch axis, therefore the origin will not move.\n\nIf you want to apply the transform in global space, set `global` to `true`. The origin of the model will move. If the model is not centered on origin and you scale globally it will look like the model moves and gets bigger at the same time. Say you have a square `(1,1) - (1,2) - (2,2) - (2,1)` and you scale by 2 globally it will become `(2,2) - (2,4)`...etc so the origin has moved from `(1.5, 1.5)` to `(2,2)`.", "tags": [], "keywordArguments": true, "args": [ { "name": "objects", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid, sketch, or set of solids or sketches to scale.", "labelRequired": false }, { "name": "x", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The scale factor for the x axis. Default is 1 if not provided.", "labelRequired": true }, { "name": "y", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The scale factor for the y axis. Default is 1 if not provided.", "labelRequired": true }, { "name": "z", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The scale factor for the z axis. Default is 1 if not provided.", "labelRequired": true }, { "name": "global", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move.", "labelRequired": true } ], "returnValue": { "name": "", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Scale a pipe.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> scale(z = 2.5)", "// Scale an imported model.\n\n\nimport \"tests/inputs/cube.sldprt\" as cube\n\ncube\n |> scale(y = 2.5)", "// Sweep two sketches along the same path.\n\n\nsketch001 = startSketchOn(XY)\nrectangleSketch = startProfileAt([-200, 23.86], sketch001)\n |> angledLine([0, 73.47], %, $rectangleSegmentA001)\n |> angledLine([\n segAng(rectangleSegmentA001) - 90,\n 50.61\n ], %)\n |> angledLine([\n segAng(rectangleSegmentA001),\n -segLen(rectangleSegmentA001)\n ], %)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)\n\nsketch002 = startSketchOn(YZ)\nsweepPath = startProfileAt([0, 0], sketch002)\n |> yLine(length = 231.81)\n |> tangentialArc({ radius = 80, offset = -90 }, %)\n |> xLine(length = 384.93)\n\nparts = sweep([rectangleSketch, circleSketch], path = sweepPath)\n\n// Scale the sweep.\nscale(parts, z = 0.5)" ] }, { "name": "segAng", "summary": "Compute the angle (in degrees) of the provided line segment.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [5, 10], tag = $seg01)\n |> line(end = [-10, 0])\n |> angledLine([segAng(seg01), 10], %)\n |> line(end = [-10, 0])\n |> angledLine([segAng(seg01), -15], %)\n |> close()\n\nexample = extrude(exampleSketch, length = 4)" ] }, { "name": "segEnd", "summary": "Compute the ending point of the provided line segment.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "w = 15\ncube = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [w, 0], tag = $line1)\n |> line(end = [0, w], tag = $line2)\n |> line(end = [-w, 0], tag = $line3)\n |> line(end = [0, -w], tag = $line4)\n |> close()\n |> extrude(length = 5)\n\nfn cylinder(radius, tag) {\n return startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> circle(radius = radius, center = segEnd(tag))\n |> extrude(length = radius)\n}\n\ncylinder(1, line1)\ncylinder(2, line2)\ncylinder(3, line3)\ncylinder(4, line4)" ] }, { "name": "segEndX", "summary": "Compute the ending point of the provided line segment along the 'x' axis.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [20, 0], tag = $thing)\n |> line(end = [0, 5])\n |> line(end = [segEndX(thing), 0])\n |> line(end = [-20, 10])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "segEndY", "summary": "Compute the ending point of the provided line segment along the 'y' axis.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [20, 0])\n |> line(end = [0, 3], tag = $thing)\n |> line(end = [-10, 0])\n |> line(end = [0, segEndY(thing)])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "segLen", "summary": "Compute the length of the provided line segment.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": 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(exampleSketch, length = 5)" ] }, { "name": "segStart", "summary": "Compute the starting point of the provided line segment.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "w = 15\ncube = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [w, 0], tag = $line1)\n |> line(end = [0, w], tag = $line2)\n |> line(end = [-w, 0], tag = $line3)\n |> line(end = [0, -w], tag = $line4)\n |> close()\n |> extrude(length = 5)\n\nfn cylinder(radius, tag) {\n return startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> circle(radius = radius, center = segStart(tag))\n |> extrude(length = radius)\n}\n\ncylinder(1, line1)\ncylinder(2, line2)\ncylinder(3, line3)\ncylinder(4, line4)" ] }, { "name": "segStartX", "summary": "Compute the starting point of the provided line segment along the 'x' axis.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [20, 0], tag = $thing)\n |> line(end = [0, 5])\n |> line(end = [20 - segStartX(thing), 0])\n |> line(end = [-20, 10])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "segStartY", "summary": "Compute the starting point of the provided line segment along the 'y' axis.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [20, 0])\n |> line(end = [0, 3], tag = $thing)\n |> line(end = [-10, 0])\n |> line(end = [0, 20 - segStartY(thing)])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "shell", "summary": "Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Which solid (or solids) to shell out", "labelRequired": false }, { "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", "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The thickness of the shell", "labelRequired": true }, { "name": "faces", "type": "[FaceTag]", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Array_of_FaceTag", "type": "array", "items": { "$ref": "#/components/schemas/FaceTag" }, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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": true, "includeInSnippet": true, "description": "The faces you want removed", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Remove the end face for the extrusion.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n\n// Remove the end face for the extrusion.\nshell(firstSketch, faces = ['end'], thickness = 0.25)", "// Remove the start face for the extrusion.\nfirstSketch = startSketchOn(-XZ)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0])\n |> close()\n |> extrude(length = 6)\n\n// Remove the start face for the extrusion.\nshell(firstSketch, faces = ['start'], thickness = 0.25)", "// Remove a tagged face and the end face for the extrusion.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0], tag = $myTag)\n |> close()\n |> extrude(length = 6)\n\n// Remove a tagged face for the extrusion.\nshell(firstSketch, faces = [myTag], thickness = 0.25)", "// Remove multiple faces at once.\nfirstSketch = startSketchOn(XY)\n |> startProfileAt([-12, 12], %)\n |> line(end = [24, 0])\n |> line(end = [0, -24])\n |> line(end = [-24, 0], tag = $myTag)\n |> close()\n |> extrude(length = 6)\n\n// Remove a tagged face and the end face for the extrusion.\nshell(firstSketch, faces = [myTag, 'end'], thickness = 0.25)", "// Shell a sketch on face.\nsize = 100\ncase = startSketchOn(-XZ)\n |> startProfileAt([-size, -size], %)\n |> line(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close()\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nthing2 = startSketchOn(case, 'end')\n |> circle(center = [size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\n// We put \"case\" in the shell function to shell the entire object.\nshell(case, faces = ['start'], thickness = 5)", "// Shell a sketch on face object on the end face.\nsize = 100\ncase = startSketchOn(XY)\n |> startProfileAt([-size, -size], %)\n |> line(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close()\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nthing2 = startSketchOn(case, 'end')\n |> circle(center = [size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\n// We put \"thing1\" in the shell function to shell the end face of the object.\nshell(thing1, faces = ['end'], thickness = 5)", "// 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(end = [2 * size, 0])\n |> line(end = [0, 2 * size])\n |> tangentialArcTo([-size, size], %)\n |> close()\n |> extrude(length = 65)\n\nthing1 = startSketchOn(case, 'end')\n |> circle(center = [-size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\nthing2 = startSketchOn(case, 'end')\n |> circle(center = [size / 2, -size / 2], radius = 25)\n |> extrude(length = 50)\n\n// We put \"thing1\" and \"thing2\" in the shell function to shell the end face of the object.\nshell([thing1, thing2], faces = ['end'], thickness = 5)" ] }, { "name": "sqrt", "summary": "Compute the square root of a number.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle = 50, length = sqrt(2500) }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "startProfileAt", "summary": "Start a new profile at a given point.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketchSurface", "type": "SketchSurface", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SketchSurface", "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ], "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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": { "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)", "exampleSketch = startSketchOn(-XZ)\n |> startProfileAt([10, 10], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)", "exampleSketch = startSketchOn(-XZ)\n |> startProfileAt([-10, 23], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "startSketchOn", "summary": "Start a new 2-dimensional sketch on a specific plane or face.", "description": "### Sketch on Face Behavior\n\nThere are some important behaviors to understand when sketching on a face:\n\nThe resulting sketch will _include_ the face and thus Solid that was sketched on. So say you were to export the resulting Sketch / Solid from a sketch on a face, you would get both the artifact of the sketch on the face and the parent face / Solid itself.\n\nThis is important to understand because if you were to then sketch on the resulting Solid, it would again include the face and parent Solid that was sketched on. This could go on indefinitely.\n\nThe point is if you want to export the result of a sketch on a face, you only need to export the final Solid that was created from the sketch on the face, since it will include all the parent faces and Solids.", "tags": [], "keywordArguments": false, "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/Plane" }, { "$ref": "#/components/schemas/Solid" } ], "definitions": { "PlaneData": { "description": "Orientation data that can be used to construct a plane, not a plane in itself.", "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" } } }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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": "Orientation data that can be used to construct a plane, not a plane in itself.", "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" } } }, "Plane": { "type": "object", "required": [ "artifactId", "id", "origin", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ], "definitions": { "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n\nexampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([1, 1], %)\n |> line(end = [8, 0])\n |> line(end = [0, 8])\n |> line(end = [-8, 0])\n |> close()\n\nexample002 = extrude(exampleSketch002, length = 5)\n\nexampleSketch003 = startSketchOn(example002, 'end')\n |> startProfileAt([2, 2], %)\n |> line(end = [6, 0])\n |> line(end = [0, 6])\n |> line(end = [-6, 0])\n |> close()\n\nexample003 = extrude(exampleSketch003, length = 5)", "// Sketch on the end of an extruded face by tagging the end face.\n\n\nexampleSketch = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10])\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 5, tagEnd = $end01)\n\nexampleSketch002 = startSketchOn(example, end01)\n |> startProfileAt([1, 1], %)\n |> line(end = [8, 0])\n |> line(end = [0, 8])\n |> line(end = [-8, 0])\n |> close()\n\nexample002 = extrude(exampleSketch002, length = 5, tagEnd = $end02)\n\nexampleSketch003 = startSketchOn(example002, end02)\n |> startProfileAt([2, 2], %)\n |> line(end = [6, 0])\n |> line(end = [0, 6])\n |> line(end = [-6, 0])\n |> close()\n\nexample003 = extrude(exampleSketch003, length = 5)", "exampleSketch = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0])\n |> line(end = [0, 10], tag = $sketchingFace)\n |> line(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)\n\nexampleSketch002 = startSketchOn(example, sketchingFace)\n |> startProfileAt([1, 1], %)\n |> line(end = [8, 0])\n |> line(end = [0, 8])\n |> line(end = [-8, 0])\n |> close(tag = $sketchingFace002)\n\nexample002 = extrude(exampleSketch002, length = 10)\n\nexampleSketch003 = startSketchOn(example002, sketchingFace002)\n |> startProfileAt([-8, 12], %)\n |> line(end = [0, 6])\n |> line(end = [6, 0])\n |> line(end = [0, -6])\n |> close()\n\nexample003 = extrude(exampleSketch003, length = 5)", "exampleSketch = startSketchOn(XY)\n |> startProfileAt([4, 12], %)\n |> line(end = [2, 0])\n |> line(end = [0, -6])\n |> line(end = [4, -6])\n |> line(end = [0, -6])\n |> line(end = [-3.75, -4.5])\n |> line(end = [0, -5.5])\n |> line(end = [-2, 0])\n |> close()\n\nexample = revolve(exampleSketch, axis = 'y', angle = 180)\n\nexampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([4.5, -5], %)\n |> line(end = [0, 5])\n |> line(end = [5, 0])\n |> line(end = [0, -5])\n |> close()\n\nexample002 = extrude(exampleSketch002, length = 5)", "// Sketch on the end of a revolved face by tagging the end face.\n\n\nexampleSketch = startSketchOn(XY)\n |> startProfileAt([4, 12], %)\n |> line(end = [2, 0])\n |> line(end = [0, -6])\n |> line(end = [4, -6])\n |> line(end = [0, -6])\n |> line(end = [-3.75, -4.5])\n |> line(end = [0, -5.5])\n |> line(end = [-2, 0])\n |> close()\n\nexample = revolve(\n exampleSketch,\n axis = 'y',\n angle = 180,\n tagEnd = $end01,\n)\n\nexampleSketch002 = startSketchOn(example, end01)\n |> startProfileAt([4.5, -5], %)\n |> line(end = [0, 5])\n |> line(end = [5, 0])\n |> line(end = [0, -5])\n |> close()\n\nexample002 = extrude(exampleSketch002, length = 5)", "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(end = [100.0, 0])\n |> yLine(length = -100.0)\n |> xLine(length = -100.0)\n |> yLine(length = 100.0)\n |> close()\n |> extrude(length = 3.14)" ] }, { "name": "subtract", "summary": "Subtract removes tool solids from base solids, leaving the remaining material.", "description": "Performs a boolean subtraction operation, removing the volume of one or more tool solids from one or more base solids. The result is a new solid representing the material that remains after all tool solids have been cut away. This function is essential for machining simulations, cavity creation, and complex multi-body part modeling.", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solids to use as the base to subtract from.", "labelRequired": false }, { "name": "tools", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solids to subtract.", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "// Subtract a cylinder from a cube using the stdlib functions.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> extrude(length = 10)\n\nsubtractedPart = subtract([part001], tools = [part002])", "// Subtract a cylinder from a cube using operators.\n// NOTE: This will not work when using codemods through the UI.\n// Codemods will generate the stdlib function call instead.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> extrude(length = 10)\n\n// This is the equivalent of: subtract([part001], tools=[part002])\nsubtractedPart = part001 - part002" ] }, { "name": "sweep", "summary": "Extrude a sketch along a path.", "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 path. This is useful for creating more complex shapes that can't be created with a simple extrusion.\n\nYou can provide more than one sketch to sweep, and they will all be swept along the same path.", "tags": [], "keywordArguments": true, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } } } }, "required": true, "includeInSnippet": true, "description": "The sketch or set of sketches that should be swept in space", "labelRequired": false }, { "name": "path", "type": "SweepPath", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SweepPath", "description": "A path to sweep along.", "anyOf": [ { "$ref": "#/components/schemas/Sketch" }, { "$ref": "#/components/schemas/Helix" } ], "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } } } }, "required": true, "includeInSnippet": true, "description": "The path to sweep the sketch along", "labelRequired": true }, { "name": "sectional", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } } } }, "required": false, "description": "If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components.", "labelRequired": true }, { "name": "tolerance", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } } } }, "required": false, "description": "Tolerance for this operation", "labelRequired": true }, { "name": "tagStart", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } } } }, "required": false, "description": "A named tag for the face at the start of the sweep, i.e. the original sketch", "labelRequired": true }, { "name": "tagEnd", "type": "TagNode", "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": { "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "Helix": { "description": "A helix.", "type": "object", "required": [ "angleStart", "artifactId", "ccw", "revolutions", "units", "value" ], "properties": { "value": { "description": "The id of the helix.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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?", "type": "boolean" }, "cylinderId": { "description": "The cylinder the helix was created on.", "type": "string", "format": "uuid", "nullable": true }, "units": { "$ref": "#/components/schemas/UnitLen" } } } } }, "required": false, "description": "A named tag for the face at the end of the sweep", "labelRequired": 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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Create a pipe using a sweep.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)", "// Create a spring by sweeping around a helix path.\n\n// Create a helix around the Z axis.\nhelixPath = helix(\n angleStart = 0,\n ccw = true,\n revolutions = 4,\n length = 10,\n radius = 5,\n axis = 'Z',\n)\n\n// Create a spring by sweeping around the helix path.\nspringSketch = startSketchOn(YZ)\n |> circle(center = [0, 0], radius = 1)\n |> sweep(path = helixPath)", "// Sweep two sketches along the same path.\n\n\nsketch001 = startSketchOn(XY)\nrectangleSketch = startProfileAt([-200, 23.86], sketch001)\n |> angledLine([0, 73.47], %, $rectangleSegmentA001)\n |> angledLine([\n segAng(rectangleSegmentA001) - 90,\n 50.61\n ], %)\n |> angledLine([\n segAng(rectangleSegmentA001),\n -segLen(rectangleSegmentA001)\n ], %)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)\n\nsketch002 = startSketchOn(YZ)\nsweepPath = startProfileAt([0, 0], sketch002)\n |> yLine(length = 231.81)\n |> tangentialArc({ radius = 80, offset = -90 }, %)\n |> xLine(length = 384.93)\n\nsweep([rectangleSketch, circleSketch], path = sweepPath)", "// Sectionally sweep one sketch along the path\n\n\nsketch001 = startSketchOn(XY)\ncircleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)\n\nsketch002 = startSketchOn(YZ)\nsweepPath = startProfileAt([0, 0], sketch002)\n |> yLine(length = 231.81)\n |> tangentialArc({ radius = 80, offset = -90 }, %)\n |> xLine(length = 384.93)\n\nsweep(circleSketch, path = sweepPath, sectional = true)" ] }, { "name": "tangentToEnd", "summary": "Returns the angle coming out of the end of the segment in degrees.", "description": "", "tags": [], "keywordArguments": true, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "required": true, "includeInSnippet": true, "description": "The line segment being queried by its tag", "labelRequired": false } ], "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Horizontal pill.\npillSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [20, 0])\n |> tangentialArcToRelative([0, 10], %, $arc1)\n |> angledLine({\n angle = tangentToEnd(arc1),\n length = 20\n }, %)\n |> tangentialArcToRelative([0, -10], %)\n |> close()\n\npillExtrude = extrude(pillSketch, length = 10)", "// Vertical pill. Use absolute coordinate for arc.\npillSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [0, 20])\n |> tangentialArcTo([10, 20], %, $arc1)\n |> angledLine({\n angle = tangentToEnd(arc1),\n length = 20\n }, %)\n |> tangentialArcToRelative([-10, 0], %)\n |> close()\n\npillExtrude = extrude(pillSketch, length = 10)", "rectangleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> line(end = [10, 0], tag = $seg1)\n |> angledLine({\n angle = tangentToEnd(seg1),\n length = 10\n }, %)\n |> line(end = [0, 10])\n |> line(end = [-20, 0])\n |> close()\n\nrectangleExtrude = extrude(rectangleSketch, length = 10)", "bottom = startSketchOn(XY)\n |> startProfileAt([0, 0], %)\n |> arcTo({ end = [10, 10], interior = [5, 1] }, %, $arc1)\n |> angledLine([tangentToEnd(arc1), 20], %)\n |> close()", "circSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 3, tag = $circ)\n\ntriangleSketch = startSketchOn(XY)\n |> startProfileAt([-5, 0], %)\n |> angledLine([tangentToEnd(circ), 10], %)\n |> line(end = [-15, 0])\n |> close()" ] }, { "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": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(exampleSketch, length = 10)" ] }, { "name": "tangentialArcTo", "summary": "Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches the desired (x, y) coordinates.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(end = [10, -15])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "tangentialArcToRelative", "summary": "Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches a point the given (x, y) distance away.", "description": "", "tags": [], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": 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(end = [-10, 0])\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "tau", "summary": "Return the value of `tau`. The full circle constant (τ). Equal to 2π.", "description": "**DEPRECATED** use the constant TAU", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle = 50, length = 10 * tau() }, %)\n |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "toDegrees", "summary": "Converts a number from radians to degrees.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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 |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "toRadians", "summary": "Converts a number from degrees to radians.", "description": "", "tags": [ "math" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": 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, "includeInSnippet": true, "labelRequired": 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 |> yLine(endAbsolute = 0)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)" ] }, { "name": "translate", "summary": "Move a solid or a sketch.", "description": "This is really useful for assembling parts together. You can create a part and then move it to the correct location.\n\nTranslate is really useful for sketches if you want to move a sketch and then rotate it using the `rotate` function to create a loft.", "tags": [], "keywordArguments": true, "args": [ { "name": "objects", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solid, sketch, or set of solids or sketches to move.", "labelRequired": false }, { "name": "x", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The amount to move the solid or sketch along the x axis. Defaults to 0 if not provided.", "labelRequired": true }, { "name": "y", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The amount to move the solid or sketch along the y axis. Defaults to 0 if not provided.", "labelRequired": true }, { "name": "z", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The amount to move the solid or sketch along the z axis. Defaults to 0 if not provided.", "labelRequired": true }, { "name": "global", "type": "bool", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_Boolean", "type": "boolean", "nullable": true, "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move.", "labelRequired": true } ], "returnValue": { "name": "", "type": "SolidOrSketchOrImportedGeometry", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "SolidOrSketchOrImportedGeometry", "description": "Data for a solid or an imported geometry.", "oneOf": [ { "description": "Data for an imported geometry.", "type": "object", "required": [ "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" } } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Solid" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "solidSet" ] } } }, { "type": [ "object", "array" ], "items": { "$ref": "#/components/schemas/Sketch" }, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sketchSet" ] } } } ], "definitions": { "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "// Move a pipe.\n\n// Create a path for the sweep.\nsweepPath = startSketchOn(XZ)\n |> startProfileAt([0.05, 0.05], %)\n |> line(end = [0, 7])\n |> tangentialArc({ offset = 90, radius = 5 }, %)\n |> line(end = [-3, 0])\n |> tangentialArc({ offset = -90, radius = 5 }, %)\n |> line(end = [0, 7])\n\n// Create a hole for the pipe.\npipeHole = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 1.5)\n\nsweepSketch = startSketchOn(XY)\n |> circle(center = [0, 0], radius = 2)\n |> hole(pipeHole, %)\n |> sweep(path = sweepPath)\n |> translate(x = 1.0, y = 1.0, z = 2.5)", "// Move an imported model.\n\n\nimport \"tests/inputs/cube.sldprt\" as cube\n\n// Circle so you actually see the move.\nstartSketchOn(XY)\n |> circle(center = [-10, -10], radius = 10)\n |> extrude(length = 10)\n\ncube\n |> translate(x = 10.0, y = 10.0, z = 2.5)", "// Sweep two sketches along the same path.\n\n\nsketch001 = startSketchOn(XY)\nrectangleSketch = startProfileAt([-200, 23.86], sketch001)\n |> angledLine([0, 73.47], %, $rectangleSegmentA001)\n |> angledLine([\n segAng(rectangleSegmentA001) - 90,\n 50.61\n ], %)\n |> angledLine([\n segAng(rectangleSegmentA001),\n -segLen(rectangleSegmentA001)\n ], %)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n\ncircleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)\n\nsketch002 = startSketchOn(YZ)\nsweepPath = startProfileAt([0, 0], sketch002)\n |> yLine(length = 231.81)\n |> tangentialArc({ radius = 80, offset = -90 }, %)\n |> xLine(length = 384.93)\n\nparts = sweep([rectangleSketch, circleSketch], path = sweepPath)\n\n// Move the sweeps.\ntranslate(\n parts,\n x = 1.0,\n y = 1.0,\n z = 2.5,\n)", "// Move a sketch.\n\n\nfn square(length) {\n l = length / 2\n p0 = [-l, -l]\n p1 = [-l, l]\n p2 = [l, l]\n p3 = [l, -l]\n\n return startSketchOn(XY)\n |> startProfileAt(p0, %)\n |> line(endAbsolute = p1)\n |> line(endAbsolute = p2)\n |> line(endAbsolute = p3)\n |> close()\n}\n\nsquare(10)\n |> translate(x = 5, y = 5)\n |> extrude(length = 10)", "// Translate and rotate a sketch to create a loft.\nsketch001 = startSketchOn(XY)\n\nfn square() {\n return startProfileAt([-10, 10], sketch001)\n |> xLine(length = 20)\n |> yLine(length = -20)\n |> xLine(length = -20)\n |> line(endAbsolute = [profileStartX(%), profileStartY(%)])\n |> close()\n}\n\nprofile001 = square()\n\nprofile002 = square()\n |> translate(z = 20)\n |> rotate(axis = [0, 0, 1.0], angle = 45)\n\nloft([profile001, profile002])" ] }, { "name": "union", "summary": "Union two or more solids into a single solid.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "solids", "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "The solids to union.", "labelRequired": false } ], "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": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "ArtifactId": { "type": "string", "format": "uuid" }, "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": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "SourceRange": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "Sketch": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "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": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": true, "examples": [ "// Union two cubes using the stdlib functions.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = cube([20, 10])\n\nunionedPart = union([part001, part002])", "// Union two cubes using operators.\n// NOTE: This will not work when using codemods through the UI.\n// Codemods will generate the stdlib function call instead.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = cube([20, 10])\n\n// This is the equivalent of: union([part001, part002])\nunionedPart = part001 + part002", "// Union two cubes using the more programmer-friendly operator.\n// NOTE: This will not work when using codemods through the UI.\n// Codemods will generate the stdlib function call instead.\n\n\nfn cube(center) {\n return startSketchOn(XY)\n |> startProfileAt([center[0] - 10, center[1] - 10], %)\n |> line(endAbsolute = [center[0] + 10, center[1] - 10])\n |> line(endAbsolute = [center[0] + 10, center[1] + 10])\n |> line(endAbsolute = [center[0] - 10, center[1] + 10])\n |> close()\n |> extrude(length = 10)\n}\n\npart001 = cube([0, 0])\npart002 = cube([20, 10])\n\n// This is the equivalent of: union([part001, part002])\n// Programmers will understand `|` as a union operation, but mechanical engineers\n// will understand `+`, we made both work.\nunionedPart = part001 | part002" ] }, { "name": "xLine", "summary": "Draw a line relative to the current origin to a specified distance away from the current position along the 'x' axis.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Which sketch should this path be added to?", "labelRequired": false }, { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "How far away along the X axis should this line go? Incompatible with `endAbsolute`.", "labelRequired": true }, { "name": "endAbsolute", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Which absolute X value should this line go to? Incompatible with `length`.", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Create a new tag which refers to this line", "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> xLine(length = 15)\n |> angledLine({ angle = 80, length = 15 }, %)\n |> line(end = [8, -10])\n |> xLine(length = 10)\n |> angledLine({ angle = 120, length = 30 }, %)\n |> xLine(length = -15)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "name": "yLine", "summary": "Draw a line relative to the current origin to a specified distance away from the current position along the 'y' axis.", "description": "", "tags": [], "keywordArguments": true, "args": [ { "name": "sketch", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "Which sketch should this path be added to?", "labelRequired": false }, { "name": "length", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "description": "How far away along the Y axis should this line go? Incompatible with `endAbsolute`.", "labelRequired": true }, { "name": "endAbsolute", "type": "number", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Nullable_double", "type": "number", "format": "double", "nullable": true, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Which absolute Y value should this line go to? Incompatible with `length`.", "labelRequired": true }, { "name": "tag", "type": "TagNode", "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "description": "Create a new tag which refers to this line", "labelRequired": true } ], "returnValue": { "name": "", "type": "Sketch", "schema": { "$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema", "title": "Sketch", "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } }, "definitions": { "Path": { "description": "A path.", "oneOf": [ { "description": "A path that goes to a point.", "type": "object", "required": [ "__geoMeta", "from", "to", "type", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 This is used to compute the tangential angle.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "CircleThreePoint" ] }, "p1": { "description": "Point 1 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the circle", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "p1", "p2", "p3", "to", "type", "units" ], "properties": { "type": { "type": "string", "enum": [ "ArcThreePoint" ] }, "p1": { "description": "Point 1 of the arc (base on the end of previous segment)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p2": { "description": "Point 2 of the arc (interior kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "p3": { "description": "Point 3 of the arc (end kwarg)", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units", "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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", "ccw", "center", "from", "radius", "to", "type", "units" ], "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" }, "ccw": { "description": "True if the arc is counterclockwise.", "type": "boolean" }, "from": { "description": "The from point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "to": { "description": "The to point.", "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "tag": { "description": "The tag of the path.", "allOf": [ { "$ref": "#/components/schemas/TagDeclarator" } ], "nullable": true }, "__geoMeta": { "description": "Metadata.", "allOf": [ { "$ref": "#/components/schemas/GeoMeta" } ] } } } ] }, "UnitLen": { "description": "A unit of length.", "oneOf": [ { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Mm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Cm" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "M" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Inches" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Feet" ] } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Yards" ] } } } ] }, "TagDeclarator": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string" }, "digest": { "type": "array", "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }, "maxItems": 32, "minItems": 32, "nullable": true }, "start": { "type": "integer", "format": "uint", "minimum": 0.0 }, "end": { "type": "integer", "format": "uint", "minimum": 0.0 } } }, "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": { "description": "The first two items are the start and end points (byte offsets from the start of the file). The third item is whether the source range belongs to the 'main' file, i.e., the file currently being rendered/displayed in the editor.", "type": "array", "items": { "type": "integer", "format": "uint", "minimum": 0.0 }, "maxItems": 3, "minItems": 3 }, "SketchSurface": { "description": "A sketch type.", "oneOf": [ { "type": "object", "required": [ "artifactId", "id", "origin", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "plane" ] }, "id": { "description": "The id of the plane.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, { "description": "A face.", "type": "object", "required": [ "artifactId", "id", "solid", "type", "units", "value", "xAxis", "yAxis", "zAxis" ], "properties": { "type": { "type": "string", "enum": [ "face" ] }, "id": { "description": "The id of the face.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } ] }, "units": { "$ref": "#/components/schemas/UnitLen" } } } ] }, "ArtifactId": { "type": "string", "format": "uuid" }, "PlaneType": { "description": "Type for a plane.", "oneOf": [ { "type": "string", "enum": [ "XY", "XZ", "YZ" ] }, { "description": "A custom plane.", "type": "string", "enum": [ "Custom" ] }, { "description": "A custom plane which has not been sent to the engine. It must be sent before it is used.", "type": "string", "enum": [ "Uninit" ] } ] }, "Point3d": { "type": "object", "required": [ "x", "y", "z" ], "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "Solid": { "type": "object", "required": [ "artifactId", "height", "id", "sketch", "units", "value" ], "properties": { "id": { "description": "The id of the solid.", "type": "string", "format": "uuid" }, "artifactId": { "description": "The artifact ID of the solid. Unlike `id`, this doesn't change.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "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" } }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "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": { "type": "object", "required": [ "artifactId", "id", "on", "originalId", "paths", "start", "units" ], "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" } }, "artifactId": { "description": "The original id of the sketch. This stays the same even if the sketch is is sketched on face etc.", "allOf": [ { "$ref": "#/components/schemas/ArtifactId" } ] }, "originalId": { "type": "string", "format": "uuid" }, "units": { "$ref": "#/components/schemas/UnitLen" } } }, "BasePath": { "description": "A base path.", "type": "object", "required": [ "__geoMeta", "from", "to", "units" ], "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 }, "units": { "$ref": "#/components/schemas/UnitLen" }, "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": [ "value" ], "properties": { "value": { "type": "string" } } }, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "exampleSketch = startSketchOn(XZ)\n |> startProfileAt([0, 0], %)\n |> yLine(length = 15)\n |> angledLine({ angle = 30, length = 15 }, %)\n |> line(end = [8, -10])\n |> yLine(length = -5)\n |> close()\n\nexample = extrude(exampleSketch, length = 10)" ] }, { "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" ], "keywordArguments": false, "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, "includeInSnippet": true, "labelRequired": true }, "unpublished": false, "deprecated": false, "examples": [ "totalWidth = 10 * yd()" ] } ]