Files
modeling-app/docs/kcl/std.md
Jess Frazelle e1081b0ee6 turning back on all planes (#720)
* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix more tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix stdlib

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

compile

Signed-off-by: Jess Frazelle <github@jessfraz.com>

update sample code

Signed-off-by: Jess Frazelle <github@jessfraz.com>

re-enable the planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix all tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

boilerplate

Signed-off-by: Jess Frazelle <github@jessfraz.com>

Cut release v0.9.2 (#714)

rust make default planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

use the planes from engine

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixups

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

negative args

Signed-off-by: Jess Frazelle <github@jessfraz.com>

diable camera

Signed-off-by: Jess Frazelle <github@jessfraz.com>

hide planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updatress

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fmt

Signed-off-by: Jess Frazelle <github@jessfraz.com>

Update src/hooks/useAppMode.ts

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>

Update src/hooks/useAppMode.ts

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>

cleanups

Signed-off-by: Jess Frazelle <github@jessfraz.com>

Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726)

Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27.
- [Release notes](https://github.com/KittyCAD/kittycad.rs/releases)
- [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27)

---
updated-dependencies:
- dependency-name: kittycad
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725)

Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](b04bde3461...6c7a4c0984)

---
updated-dependencies:
- dependency-name: tauri-plugin-fs-extra
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724)

Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723)

Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`.
- [Release notes](https://github.com/KittyCAD/kittycad.rs/releases)
- [Commits](61a16059b3...d3e98c4ec0)

---
updated-dependencies:
- dependency-name: openapitor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722)

Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27.
- [Release notes](https://github.com/KittyCAD/kittycad.rs/releases)
- [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27)

---
updated-dependencies:
- dependency-name: kittycad
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712)

Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0.
- [Release notes](https://github.com/oxidecomputer/expectorate/releases)
- [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0)

---
updated-dependencies:
- dependency-name: expectorate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711)

Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

refactor cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

type improvements

* use new sketchmode no camera

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* js working better

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* start of negative planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* tests and neg

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* images

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* norma;s

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* better initial load of planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* ts

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix tsc

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix edit sketch

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* add regression test for 2d solid issue

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* show planes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix clippy

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* canecel in progress

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix ci as well

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-10-05 14:27:48 -07:00

67 KiB
Raw Blame History

KCL Standard Library

Table of Contents

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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 Eulers 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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

startProfileAt

Start a profile at a given point.

startProfileAt(data: LineData, plane: Plane) -> SketchGroup

Arguments

  • data: LineData - Data to draw a line.
{
	// The tag.
	tag: string,
	// The to point.
	to: [number],
} |
[number]
  • plane: Plane - A plane.
{
	// The id of the plane.
	id: uuid,
	// Origin of the plane.
	origin: {
	x: number,
	y: number,
	z: number,
},
	// Type for a plane.
	value: string |
string,
	// What should the planes X axis be?
	xAxis: {
	x: number,
	y: number,
	z: number,
},
	// What should the planes Y axis be?
	yAxis: {
	x: number,
	y: number,
	z: number,
},
	// The z-axis (normal).
	zAxis: {
	x: number,
	y: number,
	z: number,
},
}

Returns

  • SketchGroup - A sketch group is a collection of paths.
{
	// The id of the sketch group.
	id: uuid,
	// The plane id of the sketch group.
	planeId: 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 on the 'XY' plane.

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 plane id of the sketch group.
	planeId: 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,
}],
}

startSketchOn

Start a sketch at a given point.

startSketchOn(data: PlaneData) -> Plane

Arguments

  • data: PlaneData - Data for a plane.
string |
string |
string |
string |
string |
string |
{
	plane: {
	// Origin of the plane.
	origin: {
	x: number,
	y: number,
	z: number,
},
	// What should the planes X axis be?
	x_axis: {
	x: number,
	y: number,
	z: number,
},
	// What should the planes Y axis be?
	y_axis: {
	x: number,
	y: number,
	z: number,
},
	// The z-axis (normal).
	z_axis: {
	x: number,
	y: number,
	z: number,
},
},
}

Returns

  • Plane - A plane.
{
	// The id of the plane.
	id: uuid,
	// Origin of the plane.
	origin: {
	x: number,
	y: number,
	z: number,
},
	// Type for a plane.
	value: string |
string,
	// What should the planes X axis be?
	xAxis: {
	x: number,
	y: number,
	z: number,
},
	// What should the planes Y axis be?
	yAxis: {
	x: number,
	y: number,
	z: number,
},
	// The z-axis (normal).
	zAxis: {
	x: number,
	y: number,
	z: number,
},
}

tan

Computes the tangent of a number (in radians).

tan(num: number) -> number

Arguments

  • num: number

Returns

  • number

tangentalArc

Draw an arc.

tangentalArc(data: TangentalArcData, sketch_group: SketchGroup) -> SketchGroup

Arguments

  • data: TangentalArcData - Data to draw a tangental arc.
{
	// Offset of the arc, in degrees.
	offset: number,
	// Radius of the arc. Not to be confused with Raiders of the Lost Ark.
	radius: number,
} |
{
	// The tag.
	tag: string,
	// Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position.
	to: [number],
} |
[number]
  • sketch_group: SketchGroup - A sketch group is a collection of paths.
{
	// The id of the sketch group.
	id: uuid,
	// The plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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,
}],
}

tangentalArcTo

Draw an arc.

tangentalArcTo(data: TangentalArcToData, sketch_group: SketchGroup) -> SketchGroup

Arguments

  • data: TangentalArcToData - Data to draw a tangental arc to a specific point.
{
	// The tag.
	tag: string,
	// Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position.
	to: [number],
} |
[number]
  • sketch_group: SketchGroup - A sketch group is a collection of paths.
{
	// The id of the sketch group.
	id: uuid,
	// The plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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,
}],
}

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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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 plane id of the sketch group.
	planeId: 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,
}],
}