From 03bc2eaf22eb34ed74ebd1d3a101178c18625b64 Mon Sep 17 00:00:00 2001 From: Alfredo Gutierrez <82833619+notalfredo@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:12:21 -0500 Subject: [PATCH] Docs: std.md now displays correct number of members of an array (#825) * First draft up * removed print statements * running cargo fmt --------- Co-authored-by: Jess Frazelle --- docs/kcl/std.md | 1182 +++++++++++++++++----------------- src/wasm-lib/kcl/src/docs.rs | 12 +- 2 files changed, 602 insertions(+), 592 deletions(-) diff --git a/docs/kcl/std.md b/docs/kcl/std.md index d3af604d1..b455b62a6 100644 --- a/docs/kcl/std.md +++ b/docs/kcl/std.md @@ -125,46 +125,46 @@ angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -173,11 +173,11 @@ angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -211,46 +211,46 @@ angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -259,11 +259,11 @@ angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -297,7 +297,7 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup // The tag. tag: string, } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -307,46 +307,46 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -355,11 +355,11 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -375,46 +375,46 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -423,11 +423,11 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -457,7 +457,7 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The tag. tag: string, } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -467,46 +467,46 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -515,11 +515,11 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -535,46 +535,46 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -583,11 +583,11 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -617,7 +617,7 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The tag. tag: string, } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -627,46 +627,46 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -675,11 +675,11 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -695,46 +695,46 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -743,11 +743,11 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -788,46 +788,46 @@ angledLineThatIntersects(data: AngeledLineThatIntersectsData, sketch_group: Sket // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -836,11 +836,11 @@ angledLineThatIntersects(data: AngeledLineThatIntersectsData, sketch_group: Sket } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -856,46 +856,46 @@ angledLineThatIntersects(data: AngeledLineThatIntersectsData, sketch_group: Sket // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -904,11 +904,11 @@ angledLineThatIntersects(data: AngeledLineThatIntersectsData, sketch_group: Sket } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -938,7 +938,7 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The point to draw to. to: number, } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -948,46 +948,46 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -996,11 +996,11 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1016,46 +1016,46 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1064,11 +1064,11 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1098,7 +1098,7 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The point to draw to. to: number, } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -1108,46 +1108,46 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1156,11 +1156,11 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1176,46 +1176,46 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1224,11 +1224,11 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1270,21 +1270,21 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup } | { // The center. - center: [number], + center: [number, number], // The radius. radius: number, // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | { // The center. - center: [number], + center: [number, number], // The radius. radius: number, // The to point. - to: [number], + to: [number, number], } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. @@ -1295,46 +1295,46 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1343,11 +1343,11 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1363,46 +1363,46 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1411,11 +1411,11 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1479,21 +1479,21 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup ``` { // The first control point. - control1: [number], + control1: [number, number], // The second control point. - control2: [number], + control2: [number, number], // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | { // The first control point. - control1: [number], + control1: [number, number], // The second control point. - control2: [number], + control2: [number, number], // The to point. - to: [number], + to: [number, number], } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. @@ -1504,46 +1504,46 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1552,11 +1552,11 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1572,46 +1572,46 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1620,11 +1620,11 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1672,46 +1672,46 @@ close(sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1720,11 +1720,11 @@ close(sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1740,46 +1740,46 @@ close(sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1788,11 +1788,11 @@ close(sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1860,46 +1860,46 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -1908,11 +1908,11 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -1928,9 +1928,9 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup // The id of the extrude group. id: uuid, // The position of the extrude group. - position: [number], + position: [number, number, number], // The rotation of the extrude group. - rotation: [number], + rotation: [number, number, number, number], // The extrude surfaces. value: [{ // The id of the geometry. @@ -1938,11 +1938,11 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup // The name. name: string, // The position. - position: [number], + position: [number, number, number], // The rotation. - rotation: [number], + rotation: [number, number, number, number], // The source range. - sourceRange: [number], + sourceRange: [number, number], type: string, }], } @@ -1991,9 +1991,9 @@ getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> Ex // The id of the extrude group. id: uuid, // The position of the extrude group. - position: [number], + position: [number, number, number], // The rotation of the extrude group. - rotation: [number], + rotation: [number, number, number, number], // The extrude surfaces. value: [{ // The id of the geometry. @@ -2001,11 +2001,11 @@ getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> Ex // The name. name: string, // The position. - position: [number], + position: [number, number, number], // The rotation. - rotation: [number], + rotation: [number, number, number, number], // The source range. - sourceRange: [number], + sourceRange: [number, number], type: string, }], } @@ -2016,8 +2016,8 @@ getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> Ex * `ExtrudeTransform` ``` { - position: [number], - rotation: [number], + position: [number, number, number], + rotation: [number, number, number, number], } ``` @@ -2043,46 +2043,46 @@ lastSegX(sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2091,11 +2091,11 @@ lastSegX(sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2127,46 +2127,46 @@ lastSegY(sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2175,11 +2175,11 @@ lastSegY(sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2272,9 +2272,9 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -2284,46 +2284,46 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2332,11 +2332,11 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2352,46 +2352,46 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2400,11 +2400,11 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2430,9 +2430,9 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -2442,46 +2442,46 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2490,11 +2490,11 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2510,46 +2510,46 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2558,11 +2558,11 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2752,46 +2752,46 @@ segAng(segment_name: string, sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2800,11 +2800,11 @@ segAng(segment_name: string, sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2837,46 +2837,46 @@ segEndX(segment_name: string, sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2885,11 +2885,11 @@ segEndX(segment_name: string, sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -2922,46 +2922,46 @@ segEndY(segment_name: string, sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -2970,11 +2970,11 @@ segEndY(segment_name: string, sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3007,46 +3007,46 @@ segLen(segment_name: string, sketch_group: SketchGroup) -> number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3055,11 +3055,11 @@ segLen(segment_name: string, sketch_group: SketchGroup) -> number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3091,46 +3091,46 @@ show(sketch: SketchGroup) // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3139,11 +3139,11 @@ show(sketch: SketchGroup) } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3209,9 +3209,9 @@ startProfileAt(data: LineData, plane: Plane) -> SketchGroup // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` * `plane`: `Plane` - A plane. ``` @@ -3258,46 +3258,46 @@ string, // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3306,11 +3306,11 @@ string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3336,9 +3336,9 @@ startSketchAt(data: LineData) -> SketchGroup // The tag. tag: string, // The to point. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` #### Returns @@ -3351,46 +3351,46 @@ startSketchAt(data: LineData) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3399,11 +3399,11 @@ startSketchAt(data: LineData) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3544,9 +3544,9 @@ tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup // The tag. tag: string, // Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -3556,46 +3556,46 @@ tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3604,11 +3604,11 @@ tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3624,46 +3624,46 @@ tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3672,11 +3672,11 @@ tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3702,9 +3702,9 @@ tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGro // The tag. tag: string, // Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position. - to: [number], + to: [number, number], } | -[number] +[number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. ``` @@ -3714,46 +3714,46 @@ tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGro // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3762,11 +3762,11 @@ tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGro } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3782,46 +3782,46 @@ tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGro // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3830,11 +3830,11 @@ tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGro } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3891,46 +3891,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -3939,11 +3939,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -3959,46 +3959,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4007,11 +4007,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4049,46 +4049,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4097,11 +4097,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4117,46 +4117,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4165,11 +4165,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4207,46 +4207,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4255,11 +4255,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4275,46 +4275,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4323,11 +4323,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4365,46 +4365,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4413,11 +4413,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } @@ -4433,46 +4433,46 @@ number // The plane id of the sketch group. planeId: uuid, // The position of the sketch group. - position: [number], + position: [number, number, number], // The rotation of the sketch group. - rotation: [number], + rotation: [number, number, number, number], // The starting path. start: { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, // The x coordinate. x: number, @@ -4481,11 +4481,11 @@ number } | { // The from point. - from: [number], + from: [number, number], // The name of the path. name: string, // The to point. - to: [number], + to: [number, number], type: string, }], } diff --git a/src/wasm-lib/kcl/src/docs.rs b/src/wasm-lib/kcl/src/docs.rs index 7a1630904..d9167d3e8 100644 --- a/src/wasm-lib/kcl/src/docs.rs +++ b/src/wasm-lib/kcl/src/docs.rs @@ -316,7 +316,17 @@ pub fn get_type_string_from_schema(schema: &schemars::schema::Schema) -> Result< if let Some(array_val) = &o.array { if let Some(schemars::schema::SingleOrVec::Single(items)) = &array_val.items { // Let's print out the object's properties. - return Ok((format!("[{}]", get_type_string_from_schema(items)?.0), false)); + match array_val.max_items { + Some(val) => { + return Ok(( + format!("[{}]", (0..val).map(|_| "number").collect::>().join(", ")), + false, + )); + } + None => { + return Ok((format!("[{}]", get_type_string_from_schema(items)?.0), false)); + } + }; } else if let Some(items) = &array_val.contains { return Ok((format!("[{}]", get_type_string_from_schema(items)?.0), false)); }