* initial port Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of macro Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * more macros Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * new Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of generated docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates for objects Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixiups Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * descriptions Signed-off-by: Jess Frazelle <github@jessfraz.com> * descriptions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove vecs Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
49 KiB
KCL Standard Library
Table of Contents
- Functions
minlegLenlegAngXlegAngYextrudegetExtrudeWallTransformsegEndXsegEndYlastSegXlastSegYsegLensegAngangleToMatchLengthXangleToMatchLengthYlineTolinexLineToxLineyLineToyLineangledLineToXangledLineToYangledLineangledLineOfXLengthangledLineOfYLengthangledLineThatIntersectsstartSketchAtclose
Functions
min
Returns the minimum of the given arguments.
min(args: [number]) -> number
Arguments
args:[number]
Returns
number
legLen
Returns the length of the given leg.
legLen(hypotenuse: number, leg: number) -> number
Arguments
hypotenuse:numberleg:number
Returns
number
legAngX
Returns the angle of the given leg for x.
legAngX(hypotenuse: number, leg: number) -> number
Arguments
hypotenuse:numberleg:number
Returns
number
legAngY
Returns the angle of the given leg for y.
legAngY(hypotenuse: number, leg: number) -> number
Arguments
hypotenuse:numberleg:number
Returns
number
extrude
Extrudes by a given amount.
extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup
Arguments
length:numbersketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
ExtrudeGroup- An extrude group is a collection of extrude surfaces.
{
// The height of the extrude group.
"height": number,
// The id of the extrude group.
"id": uuid,
// The position of the extrude group.
"position": [number],
// The rotation of the extrude group.
"rotation": [number],
// The extrude surfaces.
"value": [{
// The id of the geometry.
"id": uuid,
// The name.
"name": string,
// The position.
"position": [number],
// The rotation.
"rotation": [number],
// The source range.
"sourceRange": [number],
"type": string,
}],
}
getExtrudeWallTransform
Returns the extrude wall transform.
getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> ExtrudeTransform
Arguments
surface_name:stringextrude_group:ExtrudeGroup- An extrude group is a collection of extrude surfaces.
{
// The height of the extrude group.
"height": number,
// The id of the extrude group.
"id": uuid,
// The position of the extrude group.
"position": [number],
// The rotation of the extrude group.
"rotation": [number],
// The extrude surfaces.
"value": [{
// The id of the geometry.
"id": uuid,
// The name.
"name": string,
// The position.
"position": [number],
// The rotation.
"rotation": [number],
// The source range.
"sourceRange": [number],
"type": string,
}],
}
Returns
ExtrudeTransform
{
"position": [number],
"rotation": [number],
}
segEndX
Returns the segment end of x.
segEndX(segment_name: string, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringsketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
segEndY
Returns the segment end of y.
segEndY(segment_name: string, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringsketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
lastSegX
Returns the last segment of x.
lastSegX(sketch_group: SketchGroup) -> number
Arguments
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
lastSegY
Returns the last segment of y.
lastSegY(sketch_group: SketchGroup) -> number
Arguments
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
segLen
Returns the length of the segment.
segLen(segment_name: string, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringsketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
segAng
Returns the angle of the segment.
segAng(segment_name: string, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringsketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
angleToMatchLengthX
Returns the angle to match the given length for x.
angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringto:numbersketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
angleToMatchLengthY
Returns the angle to match the given length for y.
angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) -> number
Arguments
segment_name:stringto:numbersketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
number
lineTo
Draw a line to a point.
lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:LineToData- Data to draw a line to a point.
{
// The tag.
"tag": string,
// The to point.
"to": [number],
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
line
Draw a line.
line(data: LineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:LineData- Data to draw a line.
{
// The tag.
"tag": string,
// The to point.
"to": [number] |
string,
} |
[number] |
string
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
xLineTo
Draw a line to a point on the x-axis.
xLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AxisLineToData- Data to draw a line to a point on an axis.
{
// The tag.
"tag": string,
// The to point.
"to": number,
} |
number
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
xLine
Draw a line on the x-axis.
xLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AxisLineData- Data to draw a line on an axis.
{
// The length of the line.
"length": number,
// The tag.
"tag": string,
} |
number
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
yLineTo
Draw a line to a point on the y-axis.
yLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AxisLineToData- Data to draw a line to a point on an axis.
{
// The tag.
"tag": string,
// The to point.
"to": number,
} |
number
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
yLine
Draw a line on the y-axis.
yLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AxisLineData- Data to draw a line on an axis.
{
// The length of the line.
"length": number,
// The tag.
"tag": string,
} |
number
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLineToX
Draw an angled line to a given x coordinate.
angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngledLineToData- Data to draw an angled line to a point.
{
// The angle of the line.
"angle": number,
// The tag.
"tag": string,
// The point to draw to.
"to": number,
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLineToY
Draw an angled line to a given y coordinate.
angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngledLineToData- Data to draw an angled line to a point.
{
// The angle of the line.
"angle": number,
// The tag.
"tag": string,
// The point to draw to.
"to": number,
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLine
Draw an angled line.
angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngledLineData- Data to draw an angled line.
{
// The angle of the line.
"angle": number,
// The length of the line.
"length": number,
// The tag.
"tag": string,
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLineOfXLength
Draw an angled line of a given x length.
angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngledLineData- Data to draw an angled line.
{
// The angle of the line.
"angle": number,
// The length of the line.
"length": number,
// The tag.
"tag": string,
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLineOfYLength
Draw an angled line of a given y length.
angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngledLineData- Data to draw an angled line.
{
// The angle of the line.
"angle": number,
// The length of the line.
"length": number,
// The tag.
"tag": string,
} |
[number]
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
angledLineThatIntersects
Draw an angled line that intersects with a given line.
angledLineThatIntersects(data: AngeledLineThatIntersectsData, sketch_group: SketchGroup) -> SketchGroup
Arguments
data:AngeledLineThatIntersectsData- Data for drawing an angled line that intersects with a given line.
{
// The angle of the line.
"angle": number,
// The tag of the line to intersect with.
"intersectTag": string,
// The offset from the intersecting line.
"offset": number,
// The tag.
"tag": string,
}
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
startSketchAt
Start a sketch at a given point.
startSketchAt(data: LineData) -> SketchGroup
Arguments
data:LineData- Data to draw a line.
{
// The tag.
"tag": string,
// The to point.
"to": [number] |
string,
} |
[number] |
string
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
close
Close the current sketch.
close(sketch_group: SketchGroup) -> SketchGroup
Arguments
sketch_group:SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}
Returns
SketchGroup- A sketch group is a collection of paths.
{
// The id of the sketch group.
"id": uuid,
// The position of the sketch group.
"position": [number],
// The rotation of the sketch group.
"rotation": [number],
// The starting path.
"start": {
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
},
// The paths in the sketch group.
"value": [{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
// The x coordinate.
"x": number,
// The y coordinate.
"y": number,
} |
{
// The from point.
"from": [number],
// The name of the path.
"name": string,
// The to point.
"to": [number],
"type": string,
}],
}