# 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) * [`circle`](#circle) * [`close`](#close) * [`cos`](#cos) * [`e`](#e) * [`extrude`](#extrude) * [`fillet`](#fillet) * [`floor`](#floor) * [`getExtrudeWallTransform`](#getExtrudeWallTransform) * [`getNextAdjacentEdge`](#getNextAdjacentEdge) * [`getOppositeEdge`](#getOppositeEdge) * [`getPreviousAdjacentEdge`](#getPreviousAdjacentEdge) * [`hole`](#hole) * [`import`](#import) * [`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) * [`patternCircular2d`](#patternCircular2d) * [`patternCircular3d`](#patternCircular3d) * [`patternLinear2d`](#patternLinear2d) * [`patternLinear3d`](#patternLinear3d) * [`pi`](#pi) * [`pow`](#pow) * [`segAng`](#segAng) * [`segEndX`](#segEndX) * [`segEndY`](#segEndY) * [`segLen`](#segLen) * [`sin`](#sin) * [`sqrt`](#sqrt) * [`startProfileAt`](#startProfileAt) * [`startSketchAt`](#startSketchAt) * [`startSketchOn`](#startSketchOn) * [`tan`](#tan) * [`tangentialArc`](#tangentialArc) * [`tangentialArcTo`](#tangentialArcTo) * [`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` (REQUIRED) #### Returns * `number` ### acos Computes the arccosine of a number (in radians). ``` acos(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### 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` (REQUIRED) * `to`: `number` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### 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` (REQUIRED) * `to`: `number` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### angledLine Draw an angled line. ``` angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) ``` { // The angle of the line. angle: number, // The length of the line. length: number, // The tag. tag: string, } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The angle of the line. angle: number, // The length of the line. length: number, // The tag. tag: string, } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The angle of the line. angle: number, // The length of the line. length: number, // The tag. tag: string, } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### angledLineThatIntersects Draw an angled line that intersects with a given line. ``` angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `AngledLineThatIntersectsData` - Data for drawing an angled line that intersects with a given line. (REQUIRED) ``` { // 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. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The angle of the line. angle: number, // The tag. tag: string, // The point to draw to. to: number, } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The angle of the line. angle: number, // The tag. tag: string, // The point to draw to. to: number, } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### arc Draw an arc. ``` arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `ArcData` - Data to draw an arc. (REQUIRED) ``` { // The end angle. angle_end: number, // The start angle. angle_start: number, // The radius. radius: number, // The tag. tag: string, } | { // The center. center: [number, number], // The radius. radius: number, // The tag. tag: string, // The to point. to: [number, number], } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### asin Computes the arcsine of a number (in radians). ``` asin(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### atan Computes the arctangent of a number (in radians). ``` atan(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### bezierCurve Draw a bezier curve. ``` bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `BezierData` - Data to draw a bezier curve. (REQUIRED) ``` { // The first control point. control1: [number, number], // The second control point. control2: [number, number], // The tag. tag: string, // The to point. to: [number, number], } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### ceil Computes the smallest integer greater than or equal to a number. ``` ceil(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### circle Sketch a circle on the given plane ``` circle(center: [number, number], radius: number, surface: SketchSurface, tag?: String) -> SketchGroup ``` #### Arguments * `center`: `[number, number]` (REQUIRED) * `radius`: `number` (REQUIRED) * `surface`: `SketchSurface` - A sketch group type. (REQUIRED) ``` { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } ``` * `tag`: `String` (OPTIONAL) #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### close Close the current sketch. ``` close(sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` #### Arguments * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` * `tag`: `String` (OPTIONAL) #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### cos Computes the sine of a number (in radians). ``` cos(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### 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` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### fillet Create fillets on tagged paths. ``` fillet(data: FilletData, extrude_group: ExtrudeGroup) -> ExtrudeGroup ``` #### Arguments * `data`: `FilletData` - Data for fillets. (REQUIRED) ``` { // The radius of the fillet. radius: number, // The tags of the paths you want to fillet. tags: [uuid | string], } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### floor Computes the largest integer less than or equal to a number. ``` floor(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### getExtrudeWallTransform Returns the extrude wall transform. ``` getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> ExtrudeTransform ``` #### Arguments * `surface_name`: `string` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `ExtrudeTransform` ``` { position: [number, number, number], rotation: [number, number, number, number], } ``` ### getNextAdjacentEdge Get the next adjacent edge to the edge given. ``` getNextAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` #### Arguments * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `Uuid` ### getOppositeEdge Get the opposite edge to the edge given. ``` getOppositeEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` #### Arguments * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `Uuid` ### getPreviousAdjacentEdge Get the previous adjacent edge to the edge given. ``` getPreviousAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` #### Arguments * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `Uuid` ### hole Use a sketch to cut a hole in another sketch. ``` hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, type: "sketchGroup", // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } | { type: "sketchGroups", } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### import Import a CAD file. For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well. Import paths are relative to the current project directory. This only works in the desktop app not in browser. ``` import(file_path: String, options?: ImportFormat) -> ImportedGeometry ``` #### Arguments * `file_path`: `String` (REQUIRED) * `options`: `ImportFormat` - Import format specifier (OPTIONAL) ``` { type: "fbx", } | { type: "gltf", } | { // Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. coords: { // Axis the front face of a model looks along. forward: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, // Axis pointing up and away from a model. up: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, }, type: "obj", // The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. units: "cm" | "ft" | "in" | "m" | "mm" | "yd", } | { // Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. coords: { // Axis the front face of a model looks along. forward: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, // Axis pointing up and away from a model. up: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, }, type: "ply", // The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. units: "cm" | "ft" | "in" | "m" | "mm" | "yd", } | { type: "sldprt", } | { type: "step", } | { // Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. coords: { // Axis the front face of a model looks along. forward: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, // Axis pointing up and away from a model. up: { // Axis specifier. axis: "y" | "z", // Specifies which direction the axis is pointing. direction: "positive" | "negative", }, }, type: "stl", // The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. units: "cm" | "ft" | "in" | "m" | "mm" | "yd", } ``` #### Returns * `ImportedGeometry` - Data for an imported geometry. ``` { // The ID of the imported geometry. id: uuid, // The original file paths. value: [string], } ``` ### lastSegX Returns the last segment of x. ``` lastSegX(sketch_group: SketchGroup) -> number ``` #### Arguments * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### 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. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### legAngX Returns the angle of the given leg for x. ``` legAngX(hypotenuse: number, leg: number) -> number ``` #### Arguments * `hypotenuse`: `number` (REQUIRED) * `leg`: `number` (REQUIRED) #### Returns * `number` ### legAngY Returns the angle of the given leg for y. ``` legAngY(hypotenuse: number, leg: number) -> number ``` #### Arguments * `hypotenuse`: `number` (REQUIRED) * `leg`: `number` (REQUIRED) #### Returns * `number` ### legLen Returns the length of the given leg. ``` legLen(hypotenuse: number, leg: number) -> number ``` #### Arguments * `hypotenuse`: `number` (REQUIRED) * `leg`: `number` (REQUIRED) #### Returns * `number` ### line Draw a line. ``` line(data: LineData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: [number, number], } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### lineTo Draw a line to a point. ``` lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `LineToData` - Data to draw a line to a point. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: [number, number], } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### ln Computes the natural logarithm of the number. ``` ln(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### 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` (REQUIRED) * `base`: `number` (REQUIRED) #### Returns * `number` ### log10 Computes the base 10 logarithm of the number. ``` log10(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### log2 Computes the base 2 logarithm of the number. ``` log2(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### max Computes the maximum of the given arguments. ``` max(args: [number]) -> number ``` #### Arguments * `args`: `[number]` (REQUIRED) #### Returns * `number` ### min Computes the minimum of the given arguments. ``` min(args: [number]) -> number ``` #### Arguments * `args`: `[number]` (REQUIRED) #### Returns * `number` ### patternCircular2d A circular pattern on a 2D sketch. ``` patternCircular2d(data: CircularPattern2dData, sketch_group: SketchGroup) -> [SketchGroup] ``` #### Arguments * `data`: `CircularPattern2dData` - Data for a circular pattern on a 2D sketch. (REQUIRED) ``` { // The arc angle (in degrees) to place the repetitions. Must be greater than 0. arcDegrees: number, // The center about which to make th pattern. This is a 2D vector. center: [number, number], // The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. repetitions: number, // Whether or not to rotate the duplicates as they are copied. rotateDuplicates: string, } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `[SketchGroup]` ### patternCircular3d A circular pattern on a 3D model. ``` patternCircular3d(data: CircularPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] ``` #### Arguments * `data`: `CircularPattern3dData` - Data for a circular pattern on a 3D model. (REQUIRED) ``` { // The arc angle (in degrees) to place the repetitions. Must be greater than 0. arcDegrees: number, // The axis around which to make the pattern. This is a 3D vector. axis: [number, number, number], // The center about which to make th pattern. This is a 3D vector. center: [number, number, number], // The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. repetitions: number, // Whether or not to rotate the duplicates as they are copied. rotateDuplicates: string, } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `[ExtrudeGroup]` ### patternLinear2d A linear pattern on a 2D sketch. ``` patternLinear2d(data: LinearPattern2dData, sketch_group: SketchGroup) -> [SketchGroup] ``` #### Arguments * `data`: `LinearPattern2dData` - Data for a linear pattern on a 2D sketch. (REQUIRED) ``` { // The axis of the pattern. This is a 2D vector. axis: [number, number], // The distance between each repetition. This can also be referred to as spacing. distance: number, // The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. repetitions: number, } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `[SketchGroup]` ### patternLinear3d A linear pattern on a 3D model. ``` patternLinear3d(data: LinearPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] ``` #### Arguments * `data`: `LinearPattern3dData` - Data for a linear pattern on a 3D model. (REQUIRED) ``` { // The axis of the pattern. axis: [number, number, number], // The distance between each repetition. This can also be referred to as spacing. distance: number, // The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. repetitions: number, } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) ``` { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `[ExtrudeGroup]` ### 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` (REQUIRED) * `pow`: `number` (REQUIRED) #### Returns * `number` ### segAng Returns the angle of the segment. ``` segAng(segment_name: string, sketch_group: SketchGroup) -> number ``` #### Arguments * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### segEndX Returns the segment end of x. ``` segEndX(segment_name: string, sketch_group: SketchGroup) -> number ``` #### Arguments * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### segEndY Returns the segment end of y. ``` segEndY(segment_name: string, sketch_group: SketchGroup) -> number ``` #### Arguments * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### segLen Returns the length of the segment. ``` segLen(segment_name: string, sketch_group: SketchGroup) -> number ``` #### Arguments * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `number` ### sin Computes the sine of a number (in radians). ``` sin(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### sqrt Computes the square root of a number. ``` sqrt(num: number) -> number ``` #### Arguments * `num`: `number` (REQUIRED) #### Returns * `number` ### startProfileAt Start a profile at a given point. ``` startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup ``` #### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: [number, number], } | [number, number] ``` * `sketch_surface`: `SketchSurface` - A sketch group type. (REQUIRED) ``` { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s 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 plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### startSketchAt Start a sketch at a given point on the 'XY' plane. ``` startSketchAt(data: LineData) -> SketchGroup ``` #### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: [number, number], } | [number, number] ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### startSketchOn Start a sketch on a specific plane or face. ``` startSketchOn(data: SketchData, tag?: SketchOnFaceTag) -> SketchSurface ``` #### Arguments * `data`: `SketchData` - Data for start sketch on. You can start a sketch on a plane or an extrude group. (REQUIRED) ``` "XY" | "-XY" | "XZ" | "-XZ" | "YZ" | "-YZ" | { plane: { // Origin of the plane. origin: { x: number, y: number, z: number, }, // What should the plane’s X axis be? x_axis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? y_axis: { x: number, y: number, z: number, }, // The z-axis (normal). z_axis: { x: number, y: number, z: number, }, }, } | { // The id of the extrusion end cap endCapId: uuid, // The height of the extrude group. height: number, // The id of the extrude group. id: uuid, // The position of the extrude group. position: [number, number, number], // The rotation of the extrude group. rotation: [number, number, number, number], // The sketch group paths. sketchGroupValues: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The id of the extrusion start cap startCapId: uuid, // The extrude surfaces. value: [{ // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudePlane", } | { // The face id for the extrude plane. faceId: uuid, // The id of the geometry. id: uuid, // The name. name: string, // The position. position: [number, number, number], // The rotation. rotation: [number, number, number, number], // The source range. sourceRange: [number, number], type: "extrudeArc", }], // The x-axis of the extrude group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the extrude group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the extrude group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` * `tag`: `SketchOnFaceTag` - A tag for sketch on face. (OPTIONAL) ``` "start" | "end" | string ``` #### Returns * `SketchSurface` - A sketch group type. ``` { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s 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` (REQUIRED) #### Returns * `number` ### tangentialArc Draw an arc. ``` tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup ``` #### Arguments * `data`: `TangentialArcData` - Data to draw a tangential arc. (REQUIRED) ``` { // 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], } | [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### tangentialArcTo Draw an arc. ``` tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` #### Arguments * `to`: `[number]` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` * `tag`: `String` (OPTIONAL) #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: 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. (REQUIRED) ``` { // The length of the line. length: number, // The tag. tag: string, } | number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: number, } | number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The length of the line. length: number, // The tag. tag: string, } | number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` ### 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. (REQUIRED) ``` { // The tag. tag: string, // The to point. to: number, } | number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ``` #### Returns * `SketchGroup` - A sketch group is a collection of paths. ``` { // The plane id or face id of the sketch group. entityId: uuid, // The id of the sketch group. id: uuid, // What the sketch is on (can be a plane or a face). on: { // The id of the plane. id: uuid, // Origin of the plane. origin: { x: number, y: number, z: number, }, type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the plane’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, } | { // The id of the face. id: uuid, // The original sketch group id of the object we are sketching on. sketchGroupId: uuid, type: "face", // The tag of the face. value: string, // What should the face’s X axis be? xAxis: { x: number, y: number, z: number, }, // What should the face’s Y axis be? yAxis: { x: number, y: number, z: number, }, // The z-axis (normal). zAxis: { x: number, y: number, z: number, }, }, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. rotation: [number, number, number, number], // The starting path. start: { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], }, // The paths in the sketch group. value: [{ // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "ToPoint", } | { // arc's direction ccw: string, // the arc's center center: [number, number], // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArcTo", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "TangentialArc", } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Horizontal", // The x coordinate. x: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "AngledLineTo", // The x coordinate. x: number, // The y coordinate. y: number, } | { // The from point. from: [number, number], // The name of the path. name: string, // The to point. to: [number, number], type: "Base", }], // The x-axis of the sketch group base plane in the 3D space xAxis: { x: number, y: number, z: number, }, // The y-axis of the sketch group base plane in the 3D space yAxis: { x: number, y: number, z: number, }, // The z-axis of the sketch group base plane in the 3D space zAxis: { x: number, y: number, z: number, }, } ```