* nested parens fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * e, tau Signed-off-by: Jess Frazelle <github@jessfraz.com> * docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove test w log since that is a stdlib fn now Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
3872 lines
57 KiB
Markdown
3872 lines
57 KiB
Markdown
<!--- DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED. -->
|
||
|
||
# KCL Standard Library
|
||
|
||
## Table of Contents
|
||
|
||
* [Functions](#functions)
|
||
* [`abs`](#abs)
|
||
* [`acos`](#acos)
|
||
* [`angleToMatchLengthX`](#angleToMatchLengthX)
|
||
* [`angleToMatchLengthY`](#angleToMatchLengthY)
|
||
* [`angledLine`](#angledLine)
|
||
* [`angledLineOfXLength`](#angledLineOfXLength)
|
||
* [`angledLineOfYLength`](#angledLineOfYLength)
|
||
* [`angledLineThatIntersects`](#angledLineThatIntersects)
|
||
* [`angledLineToX`](#angledLineToX)
|
||
* [`angledLineToY`](#angledLineToY)
|
||
* [`arc`](#arc)
|
||
* [`asin`](#asin)
|
||
* [`atan`](#atan)
|
||
* [`bezierCurve`](#bezierCurve)
|
||
* [`ceil`](#ceil)
|
||
* [`close`](#close)
|
||
* [`cos`](#cos)
|
||
* [`e`](#e)
|
||
* [`extrude`](#extrude)
|
||
* [`floor`](#floor)
|
||
* [`getExtrudeWallTransform`](#getExtrudeWallTransform)
|
||
* [`lastSegX`](#lastSegX)
|
||
* [`lastSegY`](#lastSegY)
|
||
* [`legAngX`](#legAngX)
|
||
* [`legAngY`](#legAngY)
|
||
* [`legLen`](#legLen)
|
||
* [`line`](#line)
|
||
* [`lineTo`](#lineTo)
|
||
* [`ln`](#ln)
|
||
* [`log`](#log)
|
||
* [`log10`](#log10)
|
||
* [`log2`](#log2)
|
||
* [`max`](#max)
|
||
* [`min`](#min)
|
||
* [`pi`](#pi)
|
||
* [`pow`](#pow)
|
||
* [`segAng`](#segAng)
|
||
* [`segEndX`](#segEndX)
|
||
* [`segEndY`](#segEndY)
|
||
* [`segLen`](#segLen)
|
||
* [`show`](#show)
|
||
* [`sin`](#sin)
|
||
* [`sqrt`](#sqrt)
|
||
* [`startSketchAt`](#startSketchAt)
|
||
* [`tan`](#tan)
|
||
* [`tau`](#tau)
|
||
* [`xLine`](#xLine)
|
||
* [`xLineTo`](#xLineTo)
|
||
* [`yLine`](#yLine)
|
||
* [`yLineTo`](#yLineTo)
|
||
|
||
|
||
## Functions
|
||
|
||
### abs
|
||
|
||
Computes the absolute value of a number.
|
||
|
||
|
||
|
||
```
|
||
abs(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### acos
|
||
|
||
Computes the arccosine of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
acos(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### 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`
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### asin
|
||
|
||
Computes the arcsine of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
asin(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### atan
|
||
|
||
Computes the arctangent of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
atan(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### ceil
|
||
|
||
Computes the smallest integer greater than or equal to a number.
|
||
|
||
|
||
|
||
```
|
||
ceil(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### cos
|
||
|
||
Computes the sine of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
cos(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### e
|
||
|
||
Return the value of Euler’s number `e`.
|
||
|
||
|
||
|
||
```
|
||
e() -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
|
||
#### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### floor
|
||
|
||
Computes the largest integer less than or equal to a number.
|
||
|
||
|
||
|
||
```
|
||
floor(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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`
|
||
|
||
|
||
|
||
### 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`
|
||
|
||
|
||
|
||
### legLen
|
||
|
||
Returns the length of the given leg.
|
||
|
||
|
||
|
||
```
|
||
legLen(hypotenuse: number, leg: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `hypotenuse`: `number`
|
||
* `leg`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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],
|
||
} |
|
||
[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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### ln
|
||
|
||
Computes the natural logarithm of the number.
|
||
|
||
|
||
|
||
```
|
||
ln(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### log
|
||
|
||
Computes the logarithm of the number with respect to an arbitrary base.
|
||
|
||
The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.
|
||
|
||
```
|
||
log(num: number, base: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
* `base`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### log10
|
||
|
||
Computes the base 10 logarithm of the number.
|
||
|
||
|
||
|
||
```
|
||
log10(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### log2
|
||
|
||
Computes the base 2 logarithm of the number.
|
||
|
||
|
||
|
||
```
|
||
log2(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### max
|
||
|
||
Computes the maximum of the given arguments.
|
||
|
||
|
||
|
||
```
|
||
max(args: [number]) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `args`: `[number]`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### min
|
||
|
||
Computes the minimum of the given arguments.
|
||
|
||
|
||
|
||
```
|
||
min(args: [number]) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `args`: `[number]`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### pi
|
||
|
||
Return the value of `pi`. Archimedes’ constant (π).
|
||
|
||
|
||
|
||
```
|
||
pi() -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### pow
|
||
|
||
Computes the number to a power.
|
||
|
||
|
||
|
||
```
|
||
pow(num: number, pow: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
* `pow`: `number`
|
||
|
||
#### 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`
|
||
|
||
|
||
|
||
### 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`
|
||
|
||
|
||
|
||
### 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`
|
||
|
||
|
||
|
||
### show
|
||
|
||
Render a model.
|
||
|
||
|
||
|
||
```
|
||
show(sketch: SketchGroup)
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `sketch`: `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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### sin
|
||
|
||
Computes the sine of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
sin(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### sqrt
|
||
|
||
Computes the square root of a number.
|
||
|
||
|
||
|
||
```
|
||
sqrt(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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],
|
||
} |
|
||
[number]
|
||
```
|
||
|
||
#### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### tan
|
||
|
||
Computes the tangent of a number (in radians).
|
||
|
||
|
||
|
||
```
|
||
tan(num: number) -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
* `num`: `number`
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### tau
|
||
|
||
Return the value of `tau`. The full circle constant (τ). Equal to 2π.
|
||
|
||
|
||
|
||
```
|
||
tau() -> number
|
||
```
|
||
|
||
#### Arguments
|
||
|
||
|
||
#### Returns
|
||
|
||
* `number`
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|
||
### 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,
|
||
}],
|
||
}
|
||
```
|
||
|
||
|
||
|