Files
modeling-app/docs/kcl.md
Jess Frazelle 46cc67e2db messing around with arc and bezier (#363)
updates



fixes



updates



add another test



updates



updates



updates



updates



updates



updates



add test for error;



updates



updates



fixups



updates



updates



fixes



updates



fixes



updates



fixes



updates



updates



updates



bump

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-08-31 22:19:23 -07:00

54 KiB

KCL Standard Library

Table of Contents

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: number
  • leg: number

Returns

  • number

legAngX

Returns the angle of the given leg for x.

legAngX(hypotenuse: number, leg: number) -> number

Arguments

  • hypotenuse: number
  • leg: number

Returns

  • number

legAngY

Returns the angle of the given leg for y.

legAngY(hypotenuse: number, leg: number) -> number

Arguments

  • hypotenuse: number
  • leg: number

Returns

  • number

extrude

Extrudes by a given amount.

extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup

Arguments

  • length: 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

  • 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: string
  • extrude_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: 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

  • number

segEndY

Returns the segment end of y.

segEndY(segment_name: string, sketch_group: SketchGroup) -> number

Arguments

  • segment_name: 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

  • 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: 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

  • number

segAng

Returns the angle of the segment.

segAng(segment_name: string, sketch_group: SketchGroup) -> number

Arguments

  • segment_name: 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

  • 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: string
  • to: 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

  • 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: string
  • to: 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

  • 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,
}],
}

arc

Draw an arc.

arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup

Arguments

  • data: ArcData - Data to draw an arc.
{
	// The end angle.
	"angle_end": number,
	// The start angle.
	"angle_start": number,
	// The radius.
	"radius": number,
	// The tag.
	"tag": string,
} |
{
	// The end angle.
	"angle_end": number,
	// The start angle.
	"angle_start": number,
	// The radius.
	"radius": number,
} |
{
	// The center.
	"center": [number],
	// The radius.
	"radius": number,
	// The tag.
	"tag": string,
	// The to point.
	"to": [number],
} |
{
	// The center.
	"center": [number],
	// The radius.
	"radius": number,
	// The to point.
	"to": [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,
}],
}

bezierCurve

Draw a bezier curve.

bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup

Arguments

  • data: BezierData - Data to draw a bezier curve.
{
	// The first control point.
	"control1": [number],
	// The second control point.
	"control2": [number],
	// The tag.
	"tag": string,
	// The to point.
	"to": [number],
} |
{
	// The first control point.
	"control1": [number],
	// The second control point.
	"control2": [number],
	// The to point.
	"to": [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,
}],
}