diff --git a/docs/kcl/KNOWN-ISSUES.md b/docs/kcl/KNOWN-ISSUES.md index 93cc5d072..420bcee93 100644 --- a/docs/kcl/KNOWN-ISSUES.md +++ b/docs/kcl/KNOWN-ISSUES.md @@ -12,3 +12,5 @@ once fixed in engine will just start working here with no language changes. you cannot edit it, after v1, the engine will account for this. You also cannot currently move or transform the imported objects at all, once we have assemblies this will work. + +- **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet cases work currently. diff --git a/docs/kcl/std.json b/docs/kcl/std.json index 1c96b8f93..9349825c2 100644 --- a/docs/kcl/std.json +++ b/docs/kcl/std.json @@ -13914,38 +13914,7 @@ "description": "Data to draw an arc.", "anyOf": [ { - "description": "Angles and radius with a tag.", - "type": "object", - "required": [ - "angle_end", - "angle_start", - "radius", - "tag" - ], - "properties": { - "angle_end": { - "description": "The end angle.", - "type": "number", - "format": "double" - }, - "angle_start": { - "description": "The start angle.", - "type": "number", - "format": "double" - }, - "radius": { - "description": "The radius.", - "type": "number", - "format": "double" - }, - "tag": { - "description": "The tag.", - "type": "string" - } - } - }, - { - "description": "Angles and radius.", + "description": "Angles and radius with an optional tag.", "type": "object", "required": [ "angle_end", @@ -13967,16 +13936,21 @@ "description": "The radius.", "type": "number", "format": "double" + }, + "tag": { + "description": "The tag.", + "default": null, + "type": "string", + "nullable": true } } }, { - "description": "Center, to and radius with a tag.", + "description": "Center, to and radius with an optional tag.", "type": "object", "required": [ "center", "radius", - "tag", "to" ], "properties": { @@ -13997,43 +13971,9 @@ }, "tag": { "description": "The tag.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - { - "description": "Center, to and radius.", - "type": "object", - "required": [ - "center", - "radius", - "to" - ], - "properties": { - "center": { - "description": "The center.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "radius": { - "description": "The radius.", - "type": "number", - "format": "double" + "default": null, + "type": "string", + "nullable": true }, "to": { "description": "The to point.", @@ -16044,95 +15984,49 @@ "type": "BezierData", "schema": { "description": "Data to draw a bezier curve.", - "anyOf": [ - { - "description": "Points with a tag.", - "type": "object", - "required": [ - "control1", - "control2", - "tag", - "to" - ], - "properties": { - "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 - }, - "tag": { - "description": "The tag.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - } - } + "type": "object", + "required": [ + "control1", + "control2", + "to" + ], + "properties": { + "control1": { + "description": "The first control point.", + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "maxItems": 2, + "minItems": 2 }, - { - "description": "Points.", - "type": "object", - "required": [ - "control1", - "control2", - "to" - ], - "properties": { - "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 - }, - "to": { - "description": "The to 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 + }, + "tag": { + "description": "The tag.", + "type": "string", + "nullable": true + }, + "to": { + "description": "The to point.", + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "maxItems": 2, + "minItems": 2 } - ] + } }, "required": true }, @@ -18097,181 +17991,42 @@ "tags": [], "args": [ { - "name": "plane", - "type": "SketchData", + "name": "center", + "type": "[number, number]", "schema": { - "description": "Data for start sketch on. You can start a sketch on a plane or an extrude group.", - "anyOf": [ + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "maxItems": 2, + "minItems": 2 + }, + "required": true + }, + { + "name": "radius", + "type": "number", + "schema": { + "type": "number", + "format": "double" + }, + "required": true + }, + { + "name": "surface", + "type": "SketchSurface", + "schema": { + "description": "A sketch group type.", + "oneOf": [ { - "description": "Data for a plane.", - "oneOf": [ - { - "description": "The XY plane.", - "type": "string", - "enum": [ - "XY" - ] - }, - { - "description": "The opposite side of the XY plane.", - "type": "string", - "enum": [ - "-XY" - ] - }, - { - "description": "The XZ plane.", - "type": "string", - "enum": [ - "XZ" - ] - }, - { - "description": "The opposite side of the XZ plane.", - "type": "string", - "enum": [ - "-XZ" - ] - }, - { - "description": "The YZ plane.", - "type": "string", - "enum": [ - "YZ" - ] - }, - { - "description": "The opposite side of the YZ plane.", - "type": "string", - "enum": [ - "-YZ" - ] - }, - { - "description": "A defined plane.", - "type": "object", - "required": [ - "plane" - ], - "properties": { - "plane": { - "type": "object", - "required": [ - "origin", - "x_axis", - "y_axis", - "z_axis" - ], - "properties": { - "origin": { - "description": "Origin of the plane.", - "type": "object", - "required": [ - "x", - "y", - "z" - ], - "properties": { - "x": { - "type": "number", - "format": "double" - }, - "y": { - "type": "number", - "format": "double" - }, - "z": { - "type": "number", - "format": "double" - } - } - }, - "x_axis": { - "description": "What should the plane’s X axis be?", - "type": "object", - "required": [ - "x", - "y", - "z" - ], - "properties": { - "x": { - "type": "number", - "format": "double" - }, - "y": { - "type": "number", - "format": "double" - }, - "z": { - "type": "number", - "format": "double" - } - } - }, - "y_axis": { - "description": "What should the plane’s Y axis be?", - "type": "object", - "required": [ - "x", - "y", - "z" - ], - "properties": { - "x": { - "type": "number", - "format": "double" - }, - "y": { - "type": "number", - "format": "double" - }, - "z": { - "type": "number", - "format": "double" - } - } - }, - "z_axis": { - "description": "The z-axis (normal).", - "type": "object", - "required": [ - "x", - "y", - "z" - ], - "properties": { - "x": { - "type": "number", - "format": "double" - }, - "y": { - "type": "number", - "format": "double" - }, - "z": { - "type": "number", - "format": "double" - } - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - { - "description": "An extrude group is a collection of extrude surfaces.", + "description": "A plane.", "type": "object", "required": [ "__meta", - "height", "id", - "position", - "rotation", - "sketchGroupValues", + "origin", + "type", "value", "xAxis", "yAxis", @@ -18279,7 +18034,6 @@ ], "properties": { "__meta": { - "description": "Metadata.", "type": "array", "items": { "description": "Metadata.", @@ -18302,648 +18056,62 @@ } } }, - "endCapId": { - "description": "The id of the extrusion end cap", - "type": "string", - "format": "uuid", - "nullable": true - }, - "height": { - "description": "The height of the extrude group.", - "type": "number", - "format": "double" - }, "id": { - "description": "The id of the extrude group.", + "description": "The id of the plane.", "type": "string", "format": "uuid" }, - "position": { - "description": "The position of the extrude group.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 3, - "minItems": 3 - }, - "rotation": { - "description": "The rotation of the extrude group.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 4, - "minItems": 4 - }, - "sketchGroupValues": { - "description": "The sketch group paths.", - "type": "array", - "items": { - "description": "A path.", - "oneOf": [ - { - "description": "A path that goes to a point.", - "type": "object", - "required": [ - "__geoMeta", - "from", - "name", - "to", - "type" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "ToPoint" - ] - } - } - }, - { - "description": "A arc that is tangential to the last path segment that goes to a point", - "type": "object", - "required": [ - "__geoMeta", - "ccw", - "center", - "from", - "name", - "to", - "type" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "ccw": { - "description": "arc's direction", - "type": "boolean" - }, - "center": { - "description": "the arc's center", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "TangentialArcTo" - ] - } - } - }, - { - "description": "A arc that is tangential to the last path segment", - "type": "object", - "required": [ - "__geoMeta", - "from", - "name", - "to", - "type" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "TangentialArc" - ] - } - } - }, - { - "description": "A path that is horizontal.", - "type": "object", - "required": [ - "__geoMeta", - "from", - "name", - "to", - "type", - "x" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "Horizontal" - ] - }, - "x": { - "description": "The x coordinate.", - "type": "number", - "format": "double" - } - } - }, - { - "description": "An angled line to.", - "type": "object", - "required": [ - "__geoMeta", - "from", - "name", - "to", - "type" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "AngledLineTo" - ] - }, - "x": { - "description": "The x coordinate.", - "type": "number", - "format": "double", - "nullable": true - }, - "y": { - "description": "The y coordinate.", - "type": "number", - "format": "double", - "nullable": true - } - } - }, - { - "description": "A base path.", - "type": "object", - "required": [ - "__geoMeta", - "from", - "name", - "to", - "type" - ], - "properties": { - "__geoMeta": { - "description": "Metadata.", - "type": "object", - "required": [ - "id", - "sourceRange" - ], - "properties": { - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - } - } - }, - "from": { - "description": "The from point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "name": { - "description": "The name of the path.", - "type": "string" - }, - "to": { - "description": "The to point.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "Base" - ] - } - } - } - ] + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } } }, - "startCapId": { - "description": "The id of the extrusion start cap", + "type": { "type": "string", - "format": "uuid", - "nullable": true + "enum": [ + "plane" + ] }, "value": { - "description": "The extrude surfaces.", - "type": "array", - "items": { - "description": "An extrude surface.", - "oneOf": [ - { - "description": "An extrude plane.", - "type": "object", - "required": [ - "faceId", - "id", - "name", - "position", - "rotation", - "sourceRange", - "type" - ], - "properties": { - "faceId": { - "description": "The face id for the extrude plane.", - "type": "string", - "format": "uuid" - }, - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "name": { - "description": "The name.", - "type": "string" - }, - "position": { - "description": "The position.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 3, - "minItems": 3 - }, - "rotation": { - "description": "The rotation.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 4, - "minItems": 4 - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "extrudePlane" - ] - } - } - }, - { - "description": "An extruded arc.", - "type": "object", - "required": [ - "faceId", - "id", - "name", - "position", - "rotation", - "sourceRange", - "type" - ], - "properties": { - "faceId": { - "description": "The face id for the extrude plane.", - "type": "string", - "format": "uuid" - }, - "id": { - "description": "The id of the geometry.", - "type": "string", - "format": "uuid" - }, - "name": { - "description": "The name.", - "type": "string" - }, - "position": { - "description": "The position.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 3, - "minItems": 3 - }, - "rotation": { - "description": "The rotation.", - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 4, - "minItems": 4 - }, - "sourceRange": { - "description": "The source range.", - "type": "array", - "items": { - "type": "integer", - "format": "uint", - "minimum": 0.0 - }, - "maxItems": 2, - "minItems": 2 - }, - "type": { - "type": "string", - "enum": [ - "extrudeArc" - ] - } - } - } - ] - } + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] }, "xAxis": { - "description": "The x-axis of the extrude group base plane in the 3D space", + "description": "What should the plane’s X axis be?", "type": "object", "required": [ "x", @@ -18966,7 +18134,7 @@ } }, "yAxis": { - "description": "The y-axis of the extrude group base plane in the 3D space", + "description": "What should the plane’s Y axis be?", "type": "object", "required": [ "x", @@ -18989,7 +18157,135 @@ } }, "zAxis": { - "description": "The z-axis of the extrude group base plane in the 3D space", + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "sketchGroupId", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "sketchGroupId": { + "description": "The original sketch group id of the object we are sketching on.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", "type": "object", "required": [ "x", @@ -19018,27 +18314,12 @@ "required": true }, { - "name": "center", - "type": "[number, number]", + "name": "tag", + "type": "String", "schema": { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "maxItems": 2, - "minItems": 2 + "type": "string" }, - "required": true - }, - { - "name": "radius", - "type": "number", - "schema": { - "type": "number", - "format": "double" - }, - "required": true + "required": false } ], "returnValue": { @@ -20971,6 +20252,15 @@ } }, "required": true + }, + { + "name": "tag", + "type": "String", + "schema": { + "type": "string", + "nullable": true + }, + "required": false } ], "returnValue": { @@ -32957,7 +32247,7 @@ ], "nullable": true }, - "required": true + "required": false } ], "returnValue": { @@ -53645,7 +52935,7 @@ ], "nullable": true }, - "required": true + "required": false } ], "returnValue": { @@ -56962,7 +56252,7 @@ "type": "string", "nullable": true }, - "required": true + "required": false } ], "returnValue": { diff --git a/docs/kcl/std.md b/docs/kcl/std.md index a0bc2d90b..2e40789f0 100644 --- a/docs/kcl/std.md +++ b/docs/kcl/std.md @@ -83,7 +83,7 @@ abs(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -103,7 +103,7 @@ acos(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -123,9 +123,9 @@ angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) #### Arguments -* `segment_name`: `string` -* `to`: `number` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `to`: `number` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -308,9 +308,9 @@ angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) #### Arguments -* `segment_name`: `string` -* `to`: `number` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `to`: `number` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -493,7 +493,7 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AngledLineData` - Data to draw an angled line. +* `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) ``` { // The angle of the line. @@ -505,7 +505,7 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -851,7 +851,7 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr #### Arguments -* `data`: `AngledLineData` - Data to draw an angled line. +* `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) ``` { // The angle of the line. @@ -863,7 +863,7 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -1209,7 +1209,7 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr #### Arguments -* `data`: `AngledLineData` - Data to draw an angled line. +* `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) ``` { // The angle of the line. @@ -1221,7 +1221,7 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -1567,7 +1567,7 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc #### Arguments -* `data`: `AngledLineThatIntersectsData` - Data for drawing an angled line that intersects with a given line. +* `data`: `AngledLineThatIntersectsData` - Data for drawing an angled line that intersects with a given line. (REQUIRED) ``` { // The angle of the line. @@ -1580,7 +1580,7 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc tag: string, } ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -1926,7 +1926,7 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AngledLineToData` - Data to draw an angled line to a point. +* `data`: `AngledLineToData` - Data to draw an angled line to a point. (REQUIRED) ``` { // The angle of the line. @@ -1938,7 +1938,7 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -2284,7 +2284,7 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AngledLineToData` - Data to draw an angled line to a point. +* `data`: `AngledLineToData` - Data to draw an angled line to a point. (REQUIRED) ``` { // The angle of the line. @@ -2296,7 +2296,7 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -2642,7 +2642,7 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `ArcData` - Data to draw an arc. +* `data`: `ArcData` - Data to draw an arc. (REQUIRED) ``` { // The end angle. @@ -2654,14 +2654,6 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup // The tag. tag: string, } | -{ - // The end angle. - angle_end: number, - // The start angle. - angle_start: number, - // The radius. - radius: number, -} | { // The center. center: [number, number], @@ -2671,17 +2663,9 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup tag: string, // The to point. to: [number, number], -} | -{ - // The center. - center: [number, number], - // The radius. - radius: number, - // The to point. - to: [number, number], } ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -3027,7 +3011,7 @@ asin(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -3047,7 +3031,7 @@ atan(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -3067,7 +3051,7 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `BezierData` - Data to draw a bezier curve. +* `data`: `BezierData` - Data to draw a bezier curve. (REQUIRED) ``` { // The first control point. @@ -3078,17 +3062,9 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup tag: string, // The to point. to: [number, number], -} | -{ - // The first control point. - control1: [number, number], - // The second control point. - control2: [number, number], - // The to point. - to: [number, number], } ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -3434,7 +3410,7 @@ ceil(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -3449,169 +3425,67 @@ Sketch a circle on the given plane ``` -circle(plane: SketchData, center: [number, number], radius: number) -> SketchGroup +circle(center: [number, number], radius: number, surface: SketchSurface, tag?: String) -> SketchGroup ``` #### Arguments -* `plane`: `SketchData` - Data for start sketch on. You can start a sketch on a plane or an extrude group. +* `center`: `[number, number]` (REQUIRED) +* `radius`: `number` (REQUIRED) +* `surface`: `SketchSurface` - A sketch group type. (REQUIRED) ``` -"XY" | -"-XY" | -"XZ" | -"-XZ" | -"YZ" | -"-YZ" | { - plane: { + // The id of the plane. + id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? - x_axis: { - x: number, - y: number, - z: number, -}, - // What should the plane’s Y axis be? - y_axis: { - x: number, - y: number, - z: number, -}, - // The z-axis (normal). - z_axis: { - x: number, - y: number, - z: number, -}, -}, -} | -{ - // The id of the extrusion end cap - endCapId: uuid, - // The height of the extrude group. - height: number, - // The id of the extrude group. - id: uuid, - // The position of the extrude group. - position: [number, number, number], - // The rotation of the extrude group. - rotation: [number, number, number, number], - // The sketch group paths. - sketchGroupValues: [{ - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "ToPoint", -} | -{ - // arc's direction - ccw: string, - // the arc's center - center: [number, number], - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "TangentialArcTo", -} | -{ - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "TangentialArc", -} | -{ - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "Horizontal", - // The x coordinate. - x: number, -} | -{ - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "AngledLineTo", - // The x coordinate. - x: number, - // The y coordinate. - y: number, -} | -{ - // The from point. - from: [number, number], - // The name of the path. - name: string, - // The to point. - to: [number, number], - type: "Base", -}], - // The id of the extrusion start cap - startCapId: uuid, - // The extrude surfaces. - value: [{ - // The face id for the extrude plane. - faceId: uuid, - // The id of the geometry. - id: uuid, - // The name. - name: string, - // The position. - position: [number, number, number], - // The rotation. - rotation: [number, number, number, number], - // The source range. - sourceRange: [number, number], - type: "extrudePlane", -} | -{ - // The face id for the extrude plane. - faceId: uuid, - // The id of the geometry. - id: uuid, - // The name. - name: string, - // The position. - position: [number, number, number], - // The rotation. - rotation: [number, number, number, number], - // The source range. - sourceRange: [number, number], - type: "extrudeArc", -}], - // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, - // The y-axis of the extrude group base plane in the 3D space + // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, - // The z-axis of the extrude group base plane in the 3D space + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + // The original sketch group id of the object we are sketching on. + sketchGroupId: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). zAxis: { x: number, y: number, @@ -3619,8 +3493,7 @@ circle(plane: SketchData, center: [number, number], radius: number) -> SketchGro }, } ``` -* `center`: `[number, number]` -* `radius`: `number` +* `tag`: `String` (OPTIONAL) #### Returns @@ -3798,12 +3671,12 @@ Close the current sketch. ``` -close(sketch_group: SketchGroup) -> SketchGroup +close(sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` #### Arguments -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -3967,6 +3840,7 @@ close(sketch_group: SketchGroup) -> SketchGroup }, } ``` +* `tag`: `String` (OPTIONAL) #### Returns @@ -4149,7 +4023,7 @@ cos(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -4188,8 +4062,8 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup #### Arguments -* `length`: `number` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `length`: `number` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -4502,7 +4376,7 @@ fillet(data: FilletData, extrude_group: ExtrudeGroup) -> ExtrudeGroup #### Arguments -* `data`: `FilletData` - Data for fillets. +* `data`: `FilletData` - Data for fillets. (REQUIRED) ``` { // The radius of the fillet. @@ -4512,7 +4386,7 @@ fillet(data: FilletData, extrude_group: ExtrudeGroup) -> ExtrudeGroup string], } ``` -* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. +* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap @@ -4792,7 +4666,7 @@ floor(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -4812,8 +4686,8 @@ getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> Ex #### Arguments -* `surface_name`: `string` -* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. +* `surface_name`: `string` (REQUIRED) +* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap @@ -4969,8 +4843,8 @@ getNextAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid #### Arguments -* `tag`: `String` -* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. +* `tag`: `String` (REQUIRED) +* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap @@ -5120,8 +4994,8 @@ getOppositeEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid #### Arguments -* `tag`: `String` -* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. +* `tag`: `String` (REQUIRED) +* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap @@ -5271,8 +5145,8 @@ getPreviousAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid #### Arguments -* `tag`: `String` -* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. +* `tag`: `String` (REQUIRED) +* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap @@ -5422,7 +5296,7 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou #### Arguments -* `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. +* `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -5590,7 +5464,7 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou type: "sketchGroups", } ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -5932,13 +5806,13 @@ For formats lacking unit data (STL, OBJ, PLY), the default import unit is millim Import paths are relative to the current project directory. This only works in the desktop app not in browser. ``` -import(file_path: String, options: ImportFormat) -> ImportedGeometry +import(file_path: String, options?: ImportFormat) -> ImportedGeometry ``` #### Arguments -* `file_path`: `String` -* `options`: `ImportFormat` - Import format specifier +* `file_path`: `String` (REQUIRED) +* `options`: `ImportFormat` - Import format specifier (OPTIONAL) ``` { type: "fbx", @@ -6046,7 +5920,7 @@ lastSegX(sketch_group: SketchGroup) -> number #### Arguments -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -6229,7 +6103,7 @@ lastSegY(sketch_group: SketchGroup) -> number #### Arguments -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -6412,8 +6286,8 @@ legAngX(hypotenuse: number, leg: number) -> number #### Arguments -* `hypotenuse`: `number` -* `leg`: `number` +* `hypotenuse`: `number` (REQUIRED) +* `leg`: `number` (REQUIRED) #### Returns @@ -6433,8 +6307,8 @@ legAngY(hypotenuse: number, leg: number) -> number #### Arguments -* `hypotenuse`: `number` -* `leg`: `number` +* `hypotenuse`: `number` (REQUIRED) +* `leg`: `number` (REQUIRED) #### Returns @@ -6454,8 +6328,8 @@ legLen(hypotenuse: number, leg: number) -> number #### Arguments -* `hypotenuse`: `number` -* `leg`: `number` +* `hypotenuse`: `number` (REQUIRED) +* `leg`: `number` (REQUIRED) #### Returns @@ -6475,7 +6349,7 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `LineData` - Data to draw a line. +* `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. @@ -6485,7 +6359,7 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -6831,7 +6705,7 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `LineToData` - Data to draw a line to a point. +* `data`: `LineToData` - Data to draw a line to a point. (REQUIRED) ``` { // The tag. @@ -6841,7 +6715,7 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -7187,7 +7061,7 @@ ln(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -7207,8 +7081,8 @@ log(num: number, base: number) -> number #### Arguments -* `num`: `number` -* `base`: `number` +* `num`: `number` (REQUIRED) +* `base`: `number` (REQUIRED) #### Returns @@ -7228,7 +7102,7 @@ log10(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -7248,7 +7122,7 @@ log2(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -7268,7 +7142,7 @@ max(args: [number]) -> number #### Arguments -* `args`: `[number]` +* `args`: `[number]` (REQUIRED) #### Returns @@ -7288,7 +7162,7 @@ min(args: [number]) -> number #### Arguments -* `args`: `[number]` +* `args`: `[number]` (REQUIRED) #### Returns @@ -7308,7 +7182,7 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries #### Arguments -* `data`: `CircularPatternData` - Data for a circular pattern. +* `data`: `CircularPatternData` - Data for a circular pattern. (REQUIRED) ``` { // The arc angle (in degrees) to place the repetitions. Must be greater than 0. @@ -7323,7 +7197,7 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries rotateDuplicates: string, } ``` -* `geometry`: `Geometry` - A geometry. +* `geometry`: `Geometry` - A geometry. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -7644,7 +7518,7 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries #### Arguments -* `data`: `LinearPatternData` - Data for a linear pattern. +* `data`: `LinearPatternData` - Data for a linear pattern. (REQUIRED) ``` { // The axis of the pattern. This is a 2D vector. @@ -7655,7 +7529,7 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries repetitions: number, } ``` -* `geometry`: `Geometry` - A geometry. +* `geometry`: `Geometry` - A geometry. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -7995,8 +7869,8 @@ pow(num: number, pow: number) -> number #### Arguments -* `num`: `number` -* `pow`: `number` +* `num`: `number` (REQUIRED) +* `pow`: `number` (REQUIRED) #### Returns @@ -8016,8 +7890,8 @@ segAng(segment_name: string, sketch_group: SketchGroup) -> number #### Arguments -* `segment_name`: `string` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -8200,8 +8074,8 @@ segEndX(segment_name: string, sketch_group: SketchGroup) -> number #### Arguments -* `segment_name`: `string` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -8384,8 +8258,8 @@ segEndY(segment_name: string, sketch_group: SketchGroup) -> number #### Arguments -* `segment_name`: `string` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -8568,8 +8442,8 @@ segLen(segment_name: string, sketch_group: SketchGroup) -> number #### Arguments -* `segment_name`: `string` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `segment_name`: `string` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -8752,7 +8626,7 @@ sin(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -8772,7 +8646,7 @@ sqrt(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -8792,7 +8666,7 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup #### Arguments -* `data`: `LineData` - Data to draw a line. +* `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. @@ -8802,7 +8676,7 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup } | [number, number] ``` -* `sketch_surface`: `SketchSurface` - A sketch group type. +* `sketch_surface`: `SketchSurface` - A sketch group type. (REQUIRED) ``` { // The id of the plane. @@ -9045,7 +8919,7 @@ startSketchAt(data: LineData) -> SketchGroup #### Arguments -* `data`: `LineData` - Data to draw a line. +* `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. @@ -9232,12 +9106,12 @@ Start a sketch on a specific plane or face. ``` -startSketchOn(data: SketchData, tag: SketchOnFaceTag) -> SketchSurface +startSketchOn(data: SketchData, tag?: SketchOnFaceTag) -> SketchSurface ``` #### Arguments -* `data`: `SketchData` - Data for start sketch on. You can start a sketch on a plane or an extrude group. +* `data`: `SketchData` - Data for start sketch on. You can start a sketch on a plane or an extrude group. (REQUIRED) ``` "XY" | "-XY" | @@ -9402,7 +9276,7 @@ startSketchOn(data: SketchData, tag: SketchOnFaceTag) -> SketchSurface }, } ``` -* `tag`: `SketchOnFaceTag` - A tag for sketch on face. +* `tag`: `SketchOnFaceTag` - A tag for sketch on face. (OPTIONAL) ``` "start" | "end" | string @@ -9486,7 +9360,7 @@ tan(num: number) -> number #### Arguments -* `num`: `number` +* `num`: `number` (REQUIRED) #### Returns @@ -9506,7 +9380,7 @@ tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `TangentialArcData` - Data to draw a tangential arc. +* `data`: `TangentialArcData` - Data to draw a tangential arc. (REQUIRED) ``` { // Offset of the arc, in degrees. @@ -9522,7 +9396,7 @@ tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup } | [number, number] ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -9863,13 +9737,13 @@ Draw an arc. ``` -tangentialArcTo(to: [number], sketch_group: SketchGroup, tag: String) -> SketchGroup +tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` #### Arguments -* `to`: `[number]` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `to`: `[number]` (REQUIRED) +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -10033,7 +9907,7 @@ tangentialArcTo(to: [number], sketch_group: SketchGroup, tag: String) -> SketchG }, } ``` -* `tag`: `String` +* `tag`: `String` (OPTIONAL) #### Returns @@ -10235,7 +10109,7 @@ xLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AxisLineData` - Data to draw a line on an axis. +* `data`: `AxisLineData` - Data to draw a line on an axis. (REQUIRED) ``` { // The length of the line. @@ -10245,7 +10119,7 @@ xLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup } | number ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -10591,7 +10465,7 @@ xLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AxisLineToData` - Data to draw a line to a point on an axis. +* `data`: `AxisLineToData` - Data to draw a line to a point on an axis. (REQUIRED) ``` { // The tag. @@ -10601,7 +10475,7 @@ xLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup } | number ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -10947,7 +10821,7 @@ yLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AxisLineData` - Data to draw a line on an axis. +* `data`: `AxisLineData` - Data to draw a line on an axis. (REQUIRED) ``` { // The length of the line. @@ -10957,7 +10831,7 @@ yLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup } | number ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. @@ -11303,7 +11177,7 @@ yLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup #### Arguments -* `data`: `AxisLineToData` - Data to draw a line to a point on an axis. +* `data`: `AxisLineToData` - Data to draw a line to a point on an axis. (REQUIRED) ``` { // The tag. @@ -11313,7 +11187,7 @@ yLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup } | number ``` -* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. +* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-1-Google-Chrome-linux.png index 93de41425..2a3b170bc 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-2-Google-Chrome-linux.png index 58f25b9f0..65b5adbbc 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-inch-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-1-Google-Chrome-linux.png index 0116b0a20..3fcef41b8 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-2-Google-Chrome-linux.png index 47feaf240..eaf00b7ab 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-mm-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png index afddeee96..bcf8b09c5 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png index 9e657d259..16ed0bfe5 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png index c41a09322..5bd90e3d9 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png index 4f9bd7a14..a6748df08 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png index 41c0673c0..f6e399dde 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png index d39d6e98b..a96b14552 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png index 27ad7e73a..ad1f87a42 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png index 6c28074e6..9911427b4 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png differ diff --git a/package.json b/package.json index 9b415bb33..a477a9256 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "untitled-app", - "version": "0.15.5", + "version": "0.15.6", "private": true, "dependencies": { "@codemirror/autocomplete": "^6.10.2", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 580f519cc..44af7167c 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -144,9 +144,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -313,6 +313,12 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "base64ct" version = "1.6.0" @@ -426,9 +432,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", @@ -1805,7 +1811,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.0.0", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -1820,9 +1826,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -2021,12 +2027,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "serde", ] @@ -2371,9 +2377,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "serde", ] @@ -2788,9 +2794,9 @@ checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2" [[package]] name = "open" -version = "4.2.0" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a083c0c7e5e4a8ec4176346cf61f67ac674e8bfb059d9226e1c54a96b377c12" +checksum = "449f0ff855d85ddbf1edd5b646d65249ead3f5e422aaa86b7d2d0b049b103e32" dependencies = [ "is-wsl", "libc", @@ -3910,9 +3916,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.112" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d1bd37ce2324cf3bf85e5a25f96eb4baf0d5aa6eba43e7ae8958870c4ec48ed" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa 1.0.6", "ryu", @@ -3971,7 +3977,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.2.5", "serde", "serde_json", "serde_with_macros", @@ -4453,9 +4459,9 @@ dependencies = [ [[package]] name = "tauri" -version = "2.0.0-beta.8" +version = "2.0.0-beta.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bd3d5ccf5316833c0f71c645c25585bddf997a16bea652bf3eab8114273cff" +checksum = "e7ad6ebcb36709f29f161bd017c14c247b110a8563d90531f879df096510d697" dependencies = [ "anyhow", "bytes", @@ -4482,7 +4488,6 @@ dependencies = [ "serde_repr", "serialize-to-javascript", "state", - "static_assertions", "swift-rs", "tauri-build", "tauri-macros", @@ -4493,6 +4498,7 @@ dependencies = [ "tokio", "tray-icon", "url", + "urlpattern", "webkit2gtk", "webview2-com", "window-vibrancy", @@ -4501,9 +4507,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca30dbed856449b41abed13a5a46655ea2196075e09e99e22fe8ed0958b6aee" +checksum = "746bc44948a2de0535fd66dd11510973f091d84a2d5cb61f2cdef9db85080816" dependencies = [ "anyhow", "cargo_toml", @@ -4523,11 +4529,11 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ed45a0d2a1723ef4ea71d1aa5809c4a8bcaa92de77f6c9a8f4d4f28c5d86a" +checksum = "9d54988388d81d51c778cb93854553d6e50d3afa8fb7693ff362f718c06956f2" dependencies = [ - "base64 0.21.2", + "base64 0.22.0", "brotli", "ico", "json-patch", @@ -4550,9 +4556,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a75661fb86b350141e78ad54ce9c60346149afc5cbf41de2ca60a1ebc252b3" +checksum = "2aa739d28ebddc149d781851a22f8d4f0d1e76de7d7348475c5072cb60f56c07" dependencies = [ "heck", "proc-macro2", @@ -4564,9 +4570,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9530f0f0d809e77ff9a93da5ff2483faf8fef2cb8ed125ca7b0172cb92685d4" +checksum = "62895dc0fbcf604a20a1559e742b8eb79230e2c98564d0b99c77c953a48fd60d" dependencies = [ "anyhow", "glob", @@ -4581,9 +4587,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed2ac81ffb8fd76d854578784491bbf8d8baba274fa9e18c0bbdc4ba00b0013" +checksum = "14c7894fb904ed003fd15915b263655672be4e4581298f7fa8916016e50010ed" dependencies = [ "glib 0.16.9", "log", @@ -4599,9 +4605,9 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a556b50d761ec405087bf67e82b3936ddeaf39d4d602a443e2a0d2df6cdb2a" +checksum = "d5d71f69535111078131380bcf2a4c2f190ef4d045a33d787a606e7d4fc6a786" dependencies = [ "anyhow", "glob", @@ -4618,13 +4624,13 @@ dependencies = [ [[package]] name = "tauri-plugin-http" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f5c00ebdfdab74d9669460665a1158dacd0cc692bf95a3b7d7e5160ebbd8ad0" +checksum = "8ed4a2d9de58cafba4dbafff9330ed56b57176b9e6a153268113ffc66b5f70e7" dependencies = [ "data-url", - "glob", "http", + "regex", "reqwest", "schemars", "serde", @@ -4634,13 +4640,14 @@ dependencies = [ "tauri-plugin-fs", "thiserror", "url", + "urlpattern", ] [[package]] name = "tauri-plugin-os" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9bd936030047ce0143dda585f908f4e8433089c4aa95ef182959283483abfb" +checksum = "29d3b15199f234b9f9c9df69e75aaf0d3e001ffa71c53d7c91c0aaca02964503" dependencies = [ "gethostname", "log", @@ -4656,9 +4663,9 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb42a100bd4b6adad6f07455f54c5916d32be79d81e5914478ece45a04560cad" +checksum = "19e5c2d4187bc552d1be72081588c34187eb29e4c375cdfe99872f8d57b6aead" dependencies = [ "encoding_rs", "log", @@ -4676,9 +4683,9 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "587dfbe753c43e5db6c7f82b399c7c9f548c744ce7485d0f41a55ad7bb31d23c" +checksum = "6cb1f95a0fa908434f19241137255ad84bc9433b4b5ce6727f26f6b22a74622e" dependencies = [ "base64 0.21.2", "dirs-next", @@ -4704,9 +4711,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0381b4b96e1f4f39a24ca6472c9b016151b103a54b1425233007fdbc26cf20a8" +checksum = "b5a16d9e5634401c03477d2c3ff3d5c051efb05ed48fda5a8757e2d3e7859d6d" dependencies = [ "gtk", "http", @@ -4722,14 +4729,15 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef6a8373c9936b33a58c1bdbdd76fe4603d00ebe72304c0777bf0674e455aa" +checksum = "71cd401defa237dc112b9e53f40f628c1cac6dfdd56d6ecbba6ad85b5a016d0c" dependencies = [ "cocoa", "gtk", "http", "jni", + "log", "percent-encoding", "raw-window-handle 0.6.0", "softbuffer", @@ -4745,9 +4753,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e35e2f9a5ee8539d00dde621f176647747736a388a07c3083a0cc1b96ba6d7" +checksum = "1e9ab52971229a67ca96a8cefb7671d32aca844558518bda8e545ee5c8e1a787" dependencies = [ "brotli", "cargo_metadata", @@ -4764,6 +4772,7 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "regex", "schemars", "semver", "serde", @@ -4773,6 +4782,7 @@ dependencies = [ "thiserror", "toml 0.8.2", "url", + "urlpattern", "walkdir", ] @@ -4966,7 +4976,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -4979,7 +4989,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -5120,6 +5130,47 @@ dependencies = [ "winapi", ] +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicase" version = "2.7.0" @@ -5174,6 +5225,19 @@ dependencies = [ "serde", ] +[[package]] +name = "urlpattern" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" +dependencies = [ + "derive_more", + "regex", + "serde", + "unic-ucd-ident", + "url", +] + [[package]] name = "utf-8" version = "0.7.6" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ae84c9359..0f89d0a9a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -55,5 +55,5 @@ } }, "productName": "zoo-modeling-app", - "version": "0.15.5" + "version": "0.15.6" } diff --git a/src/clientSideScene/CameraControls.ts b/src/clientSideScene/CameraControls.ts index c308661e8..78c9210ba 100644 --- a/src/clientSideScene/CameraControls.ts +++ b/src/clientSideScene/CameraControls.ts @@ -731,6 +731,7 @@ export class CameraControls { async tweenCameraToQuaternion( targetQuaternion: Quaternion, + targetPosition = new Vector3(), duration = 500, toOrthographic = true ): Promise { @@ -750,12 +751,14 @@ export class CameraControls { } await this._tweenCameraToQuaternion( targetQuaternion, + targetPosition, remainingDuration, toOrthographic ) } _tweenCameraToQuaternion( targetQuaternion: Quaternion, + targetPosition: Vector3, duration = 500, toOrthographic = false ): Promise { @@ -763,10 +766,11 @@ export class CameraControls { const camera = this.camera this._isCamMovingCallback(true, true) const initialQuaternion = camera.quaternion.clone() + const initialTarget = this.target.clone() const isVertical = isQuaternionVertical(targetQuaternion) let tweenEnd = isVertical ? 0.99 : 1 - const controlsTarget = this.target.clone() - const initialDistance = controlsTarget.distanceTo(camera.position.clone()) + const tempVec = new Vector3() + const initialDistance = initialTarget.distanceTo(camera.position.clone()) const cameraAtTime = (animationProgress: number /* 0 - 1 */) => { const currentQ = tempQuaternion.slerpQuaternions( @@ -774,6 +778,11 @@ export class CameraControls { targetQuaternion, animationProgress ) + const currentTarget = tempVec.lerpVectors( + initialTarget, + targetPosition, + animationProgress + ) if (this.camera instanceof PerspectiveCamera) // changing the camera position back when it's orthographic doesn't do anything // and it messes up animating back to perspective later @@ -781,12 +790,11 @@ export class CameraControls { .set(0, 0, 1) .applyQuaternion(currentQ) .multiplyScalar(initialDistance) - .add(controlsTarget) + .add(currentTarget) this.camera.up.set(0, 1, 0).applyQuaternion(currentQ).normalize() this.camera.quaternion.copy(currentQ) - this.target.copy(controlsTarget) - // this.controls.update() + this.target.copy(currentTarget) this.camera.updateProjectionMatrix() this.update() this.onCameraChange() diff --git a/src/components/CodeMenu.module.css b/src/components/CodeMenu.module.css index 173ebecc4..8d349b898 100644 --- a/src/components/CodeMenu.module.css +++ b/src/components/CodeMenu.module.css @@ -1,6 +1,6 @@ .button { @apply flex justify-between items-center gap-2 px-2 py-1 text-left border-none rounded-sm; - @apply font-mono text-xs font-bold select-none text-chalkboard-90; + @apply font-mono !no-underline text-xs font-bold select-none text-chalkboard-90; @apply ui-active:bg-energy-10/50 ui-active:text-inherit; @apply transition-colors ease-out; } diff --git a/src/components/CodeMenu.tsx b/src/components/CodeMenu.tsx index 84be24576..d544b5589 100644 --- a/src/components/CodeMenu.tsx +++ b/src/components/CodeMenu.tsx @@ -1,9 +1,6 @@ import { Menu } from '@headlessui/react' import { PropsWithChildren } from 'react' -import { - faArrowUpRightFromSquare, - faEllipsis, -} from '@fortawesome/free-solid-svg-icons' +import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons' import { ActionIcon } from './ActionIcon' import styles from './CodeMenu.module.css' import { useConvertToVariable } from 'hooks/useToolbarGuards' @@ -29,7 +26,7 @@ export const CodeMenu = ({ children }: PropsWithChildren) => { > ) + case 'three-dots': + return ( + + + + ) case 'vertical': return (
diff --git a/src/components/ProjectSidebarMenu.tsx b/src/components/ProjectSidebarMenu.tsx index a4e083354..3bbcdf962 100644 --- a/src/components/ProjectSidebarMenu.tsx +++ b/src/components/ProjectSidebarMenu.tsx @@ -11,6 +11,7 @@ import { sep } from '@tauri-apps/api/path' import { Logo } from './Logo' import { APP_NAME } from 'lib/constants' import { useCommandsContext } from 'hooks/useCommandsContext' +import { CustomIcon } from './CustomIcon' const ProjectSidebarMenu = ({ project, @@ -21,29 +22,49 @@ const ProjectSidebarMenu = ({ project?: IndexLoaderData['project'] file?: IndexLoaderData['file'] }) => { + return ( +
+ + + + {renderAsLink ? ( + <> + + + {project?.name ? project.name : APP_NAME} + + + + ) : ( + + )} +
+ ) +} + +function ProjectMenuPopover({ + project, + file, +}: { + project?: IndexLoaderData['project'] + file?: IndexLoaderData['file'] +}) { const { commandBarSend } = useCommandsContext() - return renderAsLink ? ( - - - - {project?.name ? project.name : APP_NAME} - - - ) : ( + return ( - +
{isTauri() && file?.name @@ -85,7 +106,6 @@ const ProjectSidebarMenu = ({ {({ close }) => ( <>
-