Various hover improvements (#5617)

* Show more info on hover for variables

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Move hover impls to lsp module

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Test the new hovers; fix signature syntax

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Hover tips for kwargs

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-03-04 22:53:31 +13:00
committed by GitHub
parent 6e57a80c13
commit df278c7e6a
200 changed files with 7888 additions and 4459 deletions

View File

@ -9,7 +9,7 @@ Compute the absolute value of a number.
```js
abs(num: number) -> number
abs(num: number): number
```
### Tags

View File

@ -9,7 +9,7 @@ Compute the arccosine of a number (in radians).
```js
acos(num: number) -> number
acos(num: number): number
```
### Tags

View File

@ -13,7 +13,7 @@ angleToMatchLengthX(
tag: TagIdentifier,
to: number,
sketch: Sketch,
) -> number
): number
```

View File

@ -13,7 +13,7 @@ angleToMatchLengthY(
tag: TagIdentifier,
to: number,
sketch: Sketch,
) -> number
): number
```

View File

@ -1,19 +1,19 @@
---
title: "angledLine"
excerpt: "Draw a line segment relative to the current origin using the polar"
excerpt: "Draw a line segment relative to the current origin using the polar measure of some angle and distance."
layout: manual
---
Draw a line segment relative to the current origin using the polar
Draw a line segment relative to the current origin using the polar measure of some angle and distance.
measure of some angle and distance.
```js
angledLine(
data: AngledLineData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "angledLineOfXLength"
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension.
along some angle (in degrees) for some relative length in the 'x' dimension.
```js
angledLineOfXLength(
data: AngledLineData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "angledLineOfYLength"
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension.
along some angle (in degrees) for some relative length in the 'y' dimension.
```js
angledLineOfYLength(
data: AngledLineData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "angledLineThatIntersects"
excerpt: "Draw an angled line from the current origin, constructing a line segment"
excerpt: "Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment."
layout: manual
---
Draw an angled line from the current origin, constructing a line segment
Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.
such that the newly created line intersects the desired target line segment.
```js
angledLineThatIntersects(
data: AngledLineThatIntersectsData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "angledLineToX"
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.
```js
angledLineToX(
data: AngledLineToData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "angledLineToY"
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.
```js
angledLineToY(
data: AngledLineToData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -14,7 +14,7 @@ appearance(
color: String,
metalness?: number,
roughness?: number,
) -> SolidSet
): SolidSet
```

View File

@ -15,7 +15,7 @@ arc(
data: ArcData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,10 +1,10 @@
---
title: "arcTo"
excerpt: "Draw a 3 point arc."
excerpt: "Draw a three point arc."
layout: manual
---
Draw a 3 point arc.
Draw a three point arc.
The arc is constructed such that the start point is the current position of the sketch and two more points defined as the end and interior point. The interior point is placed between the start point and end point. The radius of the arc will be controlled by how far the interior point is placed from the start and end.
@ -13,7 +13,7 @@ arcTo(
data: ArcToData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -9,7 +9,7 @@ Compute the arcsine of a number (in radians).
```js
asin(num: number) -> number
asin(num: number): number
```
### Tags

View File

@ -1,18 +1,18 @@
---
title: "assert"
excerpt: "Check a value at runtime, and raise an error if the argument provided"
excerpt: "Check a value at runtime, and raise an error if the argument provided is false."
layout: manual
---
Check a value at runtime, and raise an error if the argument provided
Check a value at runtime, and raise an error if the argument provided is false.
is false.
```js
assert(
data: bool,
message: string,
) -> ()
): ()
```

View File

@ -1,12 +1,12 @@
---
title: "assertEqual"
excerpt: "Check that a numerical value equals another at runtime,"
excerpt: "Check that a numerical value equals another at runtime, otherwise raise an error."
layout: manual
---
Check that a numerical value equals another at runtime,
Check that a numerical value equals another at runtime, otherwise raise an error.
otherwise raise an error.
```js
assertEqual(
@ -14,7 +14,7 @@ assertEqual(
right: number,
epsilon: number,
message: string,
) -> ()
): ()
```

View File

@ -1,19 +1,19 @@
---
title: "assertGreaterThan"
excerpt: "Check that a numerical value is greater than another at runtime,"
excerpt: "Check that a numerical value is greater than another at runtime, otherwise raise an error."
layout: manual
---
Check that a numerical value is greater than another at runtime,
Check that a numerical value is greater than another at runtime, otherwise raise an error.
otherwise raise an error.
```js
assertGreaterThan(
left: number,
right: number,
message: string,
) -> ()
): ()
```

View File

@ -1,19 +1,19 @@
---
title: "assertGreaterThanOrEq"
excerpt: "Check that a numerical value is greater than or equal to another at runtime,"
excerpt: "Check that a numerical value is greater than or equal to another at runtime, otherwise raise an error."
layout: manual
---
Check that a numerical value is greater than or equal to another at runtime,
Check that a numerical value is greater than or equal to another at runtime, otherwise raise an error.
otherwise raise an error.
```js
assertGreaterThanOrEq(
left: number,
right: number,
message: string,
) -> ()
): ()
```

View File

@ -1,19 +1,19 @@
---
title: "assertLessThan"
excerpt: "Check that a numerical value is less than to another at runtime,"
excerpt: "Check that a numerical value is less than to another at runtime, otherwise raise an error."
layout: manual
---
Check that a numerical value is less than to another at runtime,
Check that a numerical value is less than to another at runtime, otherwise raise an error.
otherwise raise an error.
```js
assertLessThan(
left: number,
right: number,
message: string,
) -> ()
): ()
```

View File

@ -1,19 +1,19 @@
---
title: "assertLessThanOrEq"
excerpt: "Check that a numerical value is less than or equal to another at runtime,"
excerpt: "Check that a numerical value is less than or equal to another at runtime, otherwise raise an error."
layout: manual
---
Check that a numerical value is less than or equal to another at runtime,
Check that a numerical value is less than or equal to another at runtime, otherwise raise an error.
otherwise raise an error.
```js
assertLessThanOrEq(
left: number,
right: number,
message: string,
) -> ()
): ()
```

View File

@ -9,7 +9,7 @@ Compute the arctangent of a number (in radians).
```js
atan(num: number) -> number
atan(num: number): number
```
### Tags

View File

@ -12,7 +12,7 @@ Compute the four quadrant arctangent of Y and X (in radians).
atan2(
y: number,
x: number,
) -> number
): number
```
### Tags

View File

@ -1,19 +1,19 @@
---
title: "bezierCurve"
excerpt: "Draw a smooth, continuous, curved line segment from the current origin to"
excerpt: "Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape."
layout: manual
---
Draw a smooth, continuous, curved line segment from the current origin to
Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.
the desired (x, y), using a number of control points to shape the curve's shape.
```js
bezierCurve(
data: BezierData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -9,7 +9,7 @@ Compute the smallest integer greater than or equal to a number.
```js
ceil(num: number) -> number
ceil(num: number): number
```
### Tags

View File

@ -14,7 +14,7 @@ chamfer(
length: number,
tags: [EdgeReference],
tag?: TagDeclarator,
) -> Solid
): Solid
```

View File

@ -1,12 +1,12 @@
---
title: "circle"
excerpt: "Construct a 2-dimensional circle, of the specified radius, centered at"
excerpt: "Construct a 2-dimensional circle, of the specified radius, centered at the provided (x, y) origin point."
layout: manual
---
Construct a 2-dimensional circle, of the specified radius, centered at
Construct a 2-dimensional circle, of the specified radius, centered at the provided (x, y) origin point.
the provided (x, y) origin point.
```js
circle(
@ -14,7 +14,7 @@ circle(
center: [number],
radius: number,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -15,7 +15,7 @@ circleThreePoint(
p3: [number],
sketchSurfaceOrGroup: SketchOrSurface,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,18 +1,18 @@
---
title: "close"
excerpt: "Construct a line segment from the current origin back to the profile's"
excerpt: "Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended."
layout: manual
---
Construct a line segment from the current origin back to the profile's
Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended.
origin, ensuring the resulting 2-dimensional sketch is not open-ended.
```js
close(
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `0.39
We merely provide these functions for convenience and readability, as `10 * cm()` is more readable that your intent is "I want 10 centimeters" than `10 * 10`, if the project settings are in millimeters.
```js
cm() -> number
cm(): number
```
### Tags

View File

@ -11,7 +11,7 @@ Return the value of Eulers number `e`.
**DEPRECATED** use the constant E
```js
e() -> number
e(): number
```
### Tags

View File

@ -1,18 +1,18 @@
---
title: "extrude"
excerpt: "Extend a 2-dimensional sketch through a third dimension in order to"
excerpt: "Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid."
layout: manual
---
Extend a 2-dimensional sketch through a third dimension in order to
Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.
create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.
```js
extrude(
sketchSet: SketchSet,
length: number,
) -> SolidSet
): SolidSet
```

View File

@ -15,7 +15,7 @@ fillet(
tags: [EdgeReference],
tolerance?: number,
tag?: TagDeclarator,
) -> Solid
): Solid
```

View File

@ -9,7 +9,7 @@ Compute the largest integer less than or equal to a number.
```js
floor(num: number) -> number
floor(num: number): number
```
### Tags

View File

@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `12`.
We merely provide these functions for convenience and readability, as `10 * ft()` is more readable that your intent is "I want 10 feet" than `10 * 304.8`, if the project settings are in millimeters.
```js
ft() -> number
ft(): number
```
### Tags

View File

@ -9,7 +9,7 @@ Get the next adjacent edge to the edge given.
```js
getNextAdjacentEdge(tag: TagIdentifier) -> Uuid
getNextAdjacentEdge(tag: TagIdentifier): Uuid
```

View File

@ -9,7 +9,7 @@ Get the opposite edge to the edge given.
```js
getOppositeEdge(tag: TagIdentifier) -> Uuid
getOppositeEdge(tag: TagIdentifier): Uuid
```

View File

@ -9,7 +9,7 @@ Get the previous adjacent edge to the edge given.
```js
getPreviousAdjacentEdge(tag: TagIdentifier) -> Uuid
getPreviousAdjacentEdge(tag: TagIdentifier): Uuid
```

View File

@ -16,7 +16,7 @@ helix(
radius: number,
axis: Axis3dOrEdgeReference,
length?: number,
) -> HelixValue
): HelixValue
```

View File

@ -12,7 +12,7 @@ Create a helix on a cylinder.
helixRevolutions(
data: HelixRevolutionsData,
solid: Solid,
) -> Solid
): Solid
```

View File

@ -12,7 +12,7 @@ Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.
hole(
holeSketch: SketchSet,
sketch: Sketch,
) -> Sketch
): Sketch
```

View File

@ -12,7 +12,7 @@ Remove volume from a 3-dimensional shape such that a wall of the provided thickn
hollow(
thickness: number,
solid: Solid,
) -> Solid
): Solid
```

View File

@ -18,7 +18,7 @@ Note: The import command currently only works when using the native Modeling App
import(
filePath: String,
options?: ImportFormat,
) -> ImportedGeometry
): ImportedGeometry
```

View File

@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `1`.
We merely provide these functions for convenience and readability, as `10 * inch()` is more readable that your intent is "I want 10 inches" than `10 * 25.4`, if the project settings are in millimeters.
```js
inch() -> number
inch(): number
```
### Tags

View File

@ -11,7 +11,7 @@ Convert a number to an integer.
DEPRECATED use floor(), ceil(), or round().
```js
int(num: number) -> number
int(num: number): number
```
### Tags

View File

@ -1,15 +1,15 @@
---
title: "lastSegX"
excerpt: "Extract the 'x' axis value of the last line segment in the provided 2-d"
excerpt: "Extract the 'x' axis value of the last line segment in the provided 2-d sketch."
layout: manual
---
Extract the 'x' axis value of the last line segment in the provided 2-d
Extract the 'x' axis value of the last line segment in the provided 2-d sketch.
sketch.
```js
lastSegX(sketch: Sketch) -> number
lastSegX(sketch: Sketch): number
```

View File

@ -1,15 +1,15 @@
---
title: "lastSegY"
excerpt: "Extract the 'y' axis value of the last line segment in the provided 2-d"
excerpt: "Extract the 'y' axis value of the last line segment in the provided 2-d sketch."
layout: manual
---
Extract the 'y' axis value of the last line segment in the provided 2-d
Extract the 'y' axis value of the last line segment in the provided 2-d sketch.
sketch.
```js
lastSegY(sketch: Sketch) -> number
lastSegY(sketch: Sketch): number
```

View File

@ -12,7 +12,7 @@ Compute the angle of the given leg for x.
legAngX(
hypotenuse: number,
leg: number,
) -> number
): number
```
### Tags

View File

@ -12,7 +12,7 @@ Compute the angle of the given leg for y.
legAngY(
hypotenuse: number,
leg: number,
) -> number
): number
```
### Tags

View File

@ -12,7 +12,7 @@ Compute the length of the given leg.
legLen(
hypotenuse: number,
leg: number,
) -> number
): number
```
### Tags

View File

@ -14,7 +14,7 @@ line(
endAbsolute?: [number],
end?: [number],
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -9,7 +9,7 @@ Compute the natural logarithm of the number.
```js
ln(num: number) -> number
ln(num: number): number
```
### Tags

View File

@ -15,7 +15,7 @@ loft(
bezApproximateRational: bool,
baseCurveIndex?: integer,
tolerance?: number,
) -> Solid
): Solid
```

View File

@ -12,7 +12,7 @@ The result might not be correctly rounded owing to implementation details; `log2
log(
num: number,
base: number,
) -> number
): number
```
### Tags

View File

@ -9,7 +9,7 @@ Compute the base 10 logarithm of the number.
```js
log10(num: number) -> number
log10(num: number): number
```
### Tags

View File

@ -9,7 +9,7 @@ Compute the base 2 logarithm of the number.
```js
log2(num: number) -> number
log2(num: number): number
```
### Tags

View File

@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `39.3
We merely provide these functions for convenience and readability, as `10 * m()` is more readable that your intent is "I want 10 meters" than `10 * 1000`, if the project settings are in millimeters.
```js
m() -> number
m(): number
```
### Tags

View File

@ -12,7 +12,7 @@ Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(
map(
array: [KclValue],
mapFn: FunctionSource,
) -> [KclValue]
): [KclValue]
```

View File

@ -9,7 +9,7 @@ Compute the maximum of the given arguments.
```js
max(args: [number]) -> number
max(args: [number]): number
```
### Tags

View File

@ -9,7 +9,7 @@ Compute the minimum of the given arguments.
```js
min(args: [number]) -> number
min(args: [number]): number
```
### Tags

View File

@ -14,7 +14,7 @@ Mirror occurs around a local sketch axis rather than a global axis.
mirror2d(
data: Mirror2dData,
sketchSet: SketchSet,
) -> [Sketch]
): [Sketch]
```

View File

@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `(1/2
We merely provide these functions for convenience and readability, as `10 * mm()` is more readable that your intent is "I want 10 millimeters" than `10 * (1/25.4)`, if the project settings are in inches.
```js
mm() -> number
mm(): number
```
### Tags

View File

@ -12,7 +12,7 @@ For example, if you offset the 'XZ' plane by 10, the new plane will be parallel
offsetPlane(
plane: PlaneData,
offset: number,
) -> Plane
): Plane
```

View File

@ -1,12 +1,12 @@
---
title: "patternCircular2d"
excerpt: "Repeat a 2-dimensional sketch some number of times along a partial or"
excerpt: "Repeat a 2-dimensional sketch some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained."
layout: manual
---
Repeat a 2-dimensional sketch some number of times along a partial or
Repeat a 2-dimensional sketch some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
```js
patternCircular2d(
@ -16,7 +16,7 @@ patternCircular2d(
arcDegrees: number,
rotateDuplicates: bool,
useOriginal?: bool,
) -> [Sketch]
): [Sketch]
```

View File

@ -1,12 +1,12 @@
---
title: "patternCircular3d"
excerpt: "Repeat a 3-dimensional solid some number of times along a partial or"
excerpt: "Repeat a 3-dimensional solid some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained."
layout: manual
---
Repeat a 3-dimensional solid some number of times along a partial or
Repeat a 3-dimensional solid some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.
```js
patternCircular3d(
@ -17,7 +17,7 @@ patternCircular3d(
arcDegrees: number,
rotateDuplicates: bool,
useOriginal?: bool,
) -> [Solid]
): [Solid]
```

View File

@ -1,12 +1,12 @@
---
title: "patternLinear2d"
excerpt: "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount"
excerpt: "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times."
layout: manual
---
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times.
of distance between each repetition, some specified number of times.
```js
patternLinear2d(
@ -15,7 +15,7 @@ patternLinear2d(
distance: number,
axis: [number],
useOriginal?: bool,
) -> [Sketch]
): [Sketch]
```

View File

@ -1,12 +1,10 @@
---
title: "patternLinear3d"
excerpt: "Repeat a 3-dimensional solid along a linear path, with a dynamic amount"
excerpt: "Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times."
layout: manual
---
Repeat a 3-dimensional solid along a linear path, with a dynamic amount
of distance between each repetition, some specified number of times.
Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times.
///
@ -17,7 +15,7 @@ patternLinear3d(
distance: number,
axis: [number],
useOriginal?: bool,
) -> [Solid]
): [Solid]
```

View File

@ -40,7 +40,7 @@ patternTransform(
instances: integer,
transform: FunctionSource,
useOriginal?: bool,
) -> [Solid]
): [Solid]
```

View File

@ -14,7 +14,7 @@ patternTransform2d(
instances: integer,
transform: FunctionSource,
useOriginal?: bool,
) -> [Sketch]
): [Sketch]
```

View File

@ -11,7 +11,7 @@ Return the value of `pi`. Archimedes constant (π).
**DEPRECATED** use the constant PI
```js
pi() -> number
pi(): number
```
### Tags

View File

@ -1,15 +1,15 @@
---
title: "polar"
excerpt: "Convert polar/sphere (azimuth, elevation, distance) coordinates to"
excerpt: "Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates."
layout: manual
---
Convert polar/sphere (azimuth, elevation, distance) coordinates to
Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates.
cartesian (x/y/z grid) coordinates.
```js
polar(data: PolarCoordsData) -> [number]
polar(data: PolarCoordsData): [number]
```

View File

@ -13,7 +13,7 @@ polygon(
data: PolygonData,
sketchSurfaceOrGroup: SketchOrSurface,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -9,7 +9,7 @@ Remove the last element from an array.
Returns a new array with the last element removed.
```js
pop(array: [KclValue]) -> KclValue
pop(array: [KclValue]): KclValue
```

View File

@ -12,7 +12,7 @@ Compute the number to a power.
pow(
num: number,
pow: number,
) -> number
): number
```
### Tags

View File

@ -1,15 +1,15 @@
---
title: "profileStart"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin value."
layout: manual
---
Extract the provided 2-dimensional sketch's profile's origin
Extract the provided 2-dimensional sketch's profile's origin value.
value.
```js
profileStart(sketch: Sketch) -> [number]
profileStart(sketch: Sketch): [number]
```

View File

@ -1,15 +1,15 @@
---
title: "profileStartX"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'x'"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'x' value."
layout: manual
---
Extract the provided 2-dimensional sketch's profile's origin's 'x'
Extract the provided 2-dimensional sketch's profile's origin's 'x' value.
value.
```js
profileStartX(sketch: Sketch) -> number
profileStartX(sketch: Sketch): number
```

View File

@ -1,15 +1,15 @@
---
title: "profileStartY"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'y'"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'y' value."
layout: manual
---
Extract the provided 2-dimensional sketch's profile's origin's 'y'
Extract the provided 2-dimensional sketch's profile's origin's 'y' value.
value.
```js
profileStartY(sketch: Sketch) -> number
profileStartY(sketch: Sketch): number
```

View File

@ -12,7 +12,7 @@ Returns a new array with the element appended.
push(
array: [KclValue],
elem: KclValue,
) -> KclValue
): KclValue
```

View File

@ -1,19 +1,19 @@
---
title: "reduce"
excerpt: "Take a starting value. Then, for each element of an array, calculate the next value,"
excerpt: "Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element."
layout: manual
---
Take a starting value. Then, for each element of an array, calculate the next value,
Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element.
using the previous value and the element.
```js
reduce(
array: [KclValue],
start: KclValue,
reduceFn: FunctionSource,
) -> KclValue
): KclValue
```

View File

@ -1,18 +1,18 @@
---
title: "rem"
excerpt: "Compute the remainder after dividing `num` by `div`."
excerpt: "Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too."
layout: manual
---
Compute the remainder after dividing `num` by `div`.
Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too.
If `num` is negative, the result will be too.
```js
rem(
num: number,
divisor: number,
) -> number
): number
```
### Tags

View File

@ -14,7 +14,7 @@ Revolve occurs around a local sketch axis rather than a global axis.
revolve(
data: RevolveData,
sketch: Sketch,
) -> Solid
): Solid
```

View File

@ -31,7 +31,7 @@ rotate(
axis?: [number],
angle?: number,
global?: bool,
) -> Solid
): Solid
```

View File

@ -9,7 +9,7 @@ Round a number to the nearest integer.
```js
round(num: number) -> number
round(num: number): number
```
### Tags

View File

@ -15,7 +15,7 @@ scale(
solid: Solid,
scale: [number],
global?: bool,
) -> Solid
): Solid
```

View File

@ -9,7 +9,7 @@ Compute the angle (in degrees) of the provided line segment.
```js
segAng(tag: TagIdentifier) -> number
segAng(tag: TagIdentifier): number
```

View File

@ -9,7 +9,7 @@ Compute the ending point of the provided line segment.
```js
segEnd(tag: TagIdentifier) -> [number]
segEnd(tag: TagIdentifier): [number]
```

View File

@ -9,7 +9,7 @@ Compute the ending point of the provided line segment along the 'x' axis.
```js
segEndX(tag: TagIdentifier) -> number
segEndX(tag: TagIdentifier): number
```

View File

@ -9,7 +9,7 @@ Compute the ending point of the provided line segment along the 'y' axis.
```js
segEndY(tag: TagIdentifier) -> number
segEndY(tag: TagIdentifier): number
```

View File

@ -9,7 +9,7 @@ Compute the length of the provided line segment.
```js
segLen(tag: TagIdentifier) -> number
segLen(tag: TagIdentifier): number
```

View File

@ -9,7 +9,7 @@ Compute the starting point of the provided line segment.
```js
segStart(tag: TagIdentifier) -> [number]
segStart(tag: TagIdentifier): [number]
```

View File

@ -9,7 +9,7 @@ Compute the starting point of the provided line segment along the 'x' axis.
```js
segStartX(tag: TagIdentifier) -> number
segStartX(tag: TagIdentifier): number
```

View File

@ -9,7 +9,7 @@ Compute the starting point of the provided line segment along the 'y' axis.
```js
segStartY(tag: TagIdentifier) -> number
segStartY(tag: TagIdentifier): number
```

View File

@ -1,19 +1,19 @@
---
title: "shell"
excerpt: "Remove volume from a 3-dimensional shape such that a wall of the"
excerpt: "Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction."
layout: manual
---
Remove volume from a 3-dimensional shape such that a wall of the
Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.
provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.
```js
shell(
solidSet: SolidSet,
thickness: number,
faces: [FaceTag],
) -> SolidSet
): SolidSet
```

View File

@ -9,7 +9,7 @@ Compute the square root of a number.
```js
sqrt(num: number) -> number
sqrt(num: number): number
```
### Tags

View File

@ -13,7 +13,7 @@ startProfileAt(
to: [number],
sketchSurface: SketchSurface,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -20,7 +20,7 @@ The point is if you want to export the result of a sketch on a face, you only ne
startSketchOn(
data: SketchData,
tag?: FaceTag,
) -> SketchSurface
): SketchSurface
```

View File

@ -7827,8 +7827,8 @@
},
{
"name": "angledLine",
"summary": "Draw a line segment relative to the current origin using the polar",
"description": "measure of some angle and distance.",
"summary": "Draw a line segment relative to the current origin using the polar measure of some angle and distance.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -12847,8 +12847,8 @@
},
{
"name": "angledLineOfXLength",
"summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "along some angle (in degrees) for some relative length in the 'x' dimension.",
"summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -17867,8 +17867,8 @@
},
{
"name": "angledLineOfYLength",
"summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "along some angle (in degrees) for some relative length in the 'y' dimension.",
"summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -22887,8 +22887,8 @@
},
{
"name": "angledLineThatIntersects",
"summary": "Draw an angled line from the current origin, constructing a line segment",
"description": "such that the newly created line intersects the desired target line segment.",
"summary": "Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -28987,8 +28987,8 @@
},
{
"name": "angledLineToX",
"summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.",
"summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -33992,8 +33992,8 @@
},
{
"name": "angledLineToY",
"summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.",
"summary": "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -52323,7 +52323,7 @@
},
{
"name": "arcTo",
"summary": "Draw a 3 point arc.",
"summary": "Draw a three point arc.",
"description": "The arc is constructed such that the start point is the current position of the sketch and two more points defined as the end and interior point. The interior point is placed between the start point and end point. The radius of the arc will be controlled by how far the interior point is placed from the start and end.",
"tags": [],
"keywordArguments": false,
@ -57380,8 +57380,8 @@
},
{
"name": "assert",
"summary": "Check a value at runtime, and raise an error if the argument provided",
"description": "is false.",
"summary": "Check a value at runtime, and raise an error if the argument provided is false.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57430,8 +57430,8 @@
},
{
"name": "assertEqual",
"summary": "Check that a numerical value equals another at runtime,",
"description": "otherwise raise an error.",
"summary": "Check that a numerical value equals another at runtime, otherwise raise an error.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57507,8 +57507,8 @@
},
{
"name": "assertGreaterThan",
"summary": "Check that a numerical value is greater than another at runtime,",
"description": "otherwise raise an error.",
"summary": "Check that a numerical value is greater than another at runtime, otherwise raise an error.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57571,8 +57571,8 @@
},
{
"name": "assertGreaterThanOrEq",
"summary": "Check that a numerical value is greater than or equal to another at runtime,",
"description": "otherwise raise an error.",
"summary": "Check that a numerical value is greater than or equal to another at runtime, otherwise raise an error.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57635,8 +57635,8 @@
},
{
"name": "assertLessThan",
"summary": "Check that a numerical value is less than to another at runtime,",
"description": "otherwise raise an error.",
"summary": "Check that a numerical value is less than to another at runtime, otherwise raise an error.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57699,8 +57699,8 @@
},
{
"name": "assertLessThanOrEq",
"summary": "Check that a numerical value is less than or equal to another at runtime,",
"description": "otherwise raise an error.",
"summary": "Check that a numerical value is less than or equal to another at runtime, otherwise raise an error.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -57860,8 +57860,8 @@
},
{
"name": "bezierCurve",
"summary": "Draw a smooth, continuous, curved line segment from the current origin to",
"description": "the desired (x, y), using a number of control points to shape the curve's shape.",
"summary": "Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -71169,8 +71169,8 @@
},
{
"name": "circle",
"summary": "Construct a 2-dimensional circle, of the specified radius, centered at",
"description": "the provided (x, y) origin point.",
"summary": "Construct a 2-dimensional circle, of the specified radius, centered at the provided (x, y) origin point.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -84280,8 +84280,8 @@
},
{
"name": "close",
"summary": "Construct a line segment from the current origin back to the profile's",
"description": "origin, ensuring the resulting 2-dimensional sketch is not open-ended.",
"summary": "Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -89315,8 +89315,8 @@
},
{
"name": "extrude",
"summary": "Extend a 2-dimensional sketch through a third dimension in order to",
"description": "create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.",
"summary": "Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -122706,8 +122706,8 @@
},
{
"name": "lastSegX",
"summary": "Extract the 'x' axis value of the last line segment in the provided 2-d",
"description": "sketch.",
"summary": "Extract the 'x' axis value of the last line segment in the provided 2-d sketch.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -124410,8 +124410,8 @@
},
{
"name": "lastSegY",
"summary": "Extract the 'y' axis value of the last line segment in the provided 2-d",
"description": "sketch.",
"summary": "Extract the 'y' axis value of the last line segment in the provided 2-d sketch.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -157467,8 +157467,8 @@
},
{
"name": "patternCircular2d",
"summary": "Repeat a 2-dimensional sketch some number of times along a partial or",
"description": "complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.",
"summary": "Repeat a 2-dimensional sketch some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -168843,8 +168843,8 @@
},
{
"name": "patternCircular3d",
"summary": "Repeat a 3-dimensional solid some number of times along a partial or",
"description": "complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.",
"summary": "Repeat a 3-dimensional solid some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orentation of the solid with respect to the center of the circle is maintained.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -181836,8 +181836,8 @@
},
{
"name": "patternLinear2d",
"summary": "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount",
"description": "of distance between each repetition, some specified number of times.",
"summary": "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -191605,8 +191605,8 @@
},
{
"name": "patternLinear3d",
"summary": "Repeat a 3-dimensional solid along a linear path, with a dynamic amount",
"description": "of distance between each repetition, some specified number of times.\n\n///",
"summary": "Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times.",
"description": "///",
"tags": [],
"keywordArguments": true,
"args": [
@ -217727,8 +217727,8 @@
},
{
"name": "polar",
"summary": "Convert polar/sphere (azimuth, elevation, distance) coordinates to",
"description": "cartesian (x/y/z grid) coordinates.",
"summary": "Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -228885,8 +228885,8 @@
},
{
"name": "profileStart",
"summary": "Extract the provided 2-dimensional sketch's profile's origin",
"description": "value.",
"summary": "Extract the provided 2-dimensional sketch's profile's origin value.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -230593,8 +230593,8 @@
},
{
"name": "profileStartX",
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x'",
"description": "value.",
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x' value.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -232296,8 +232296,8 @@
},
{
"name": "profileStartY",
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'y'",
"description": "value.",
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'y' value.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -242801,8 +242801,8 @@
},
{
"name": "reduce",
"summary": "Take a starting value. Then, for each element of an array, calculate the next value,",
"description": "using the previous value and the element.",
"summary": "Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -254200,8 +254200,8 @@
},
{
"name": "rem",
"summary": "Compute the remainder after dividing `num` by `div`.",
"description": "If `num` is negative, the result will be too.",
"summary": "Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too.",
"description": "",
"tags": [
"math"
],
@ -287644,8 +287644,8 @@
},
{
"name": "shell",
"summary": "Remove volume from a 3-dimensional shape such that a wall of the",
"description": "provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.",
"summary": "Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
@ -319362,8 +319362,8 @@
},
{
"name": "tangentialArcTo",
"summary": "Starting at the current sketch's origin, draw a curved line segment along",
"description": "some part of an imaginary circle until it reaches the desired (x, y) coordinates.",
"summary": "Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches the desired (x, y) coordinates.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -324356,8 +324356,8 @@
},
{
"name": "tangentialArcToRelative",
"summary": "Starting at the current sketch's origin, draw a curved line segment along",
"description": "some part of an imaginary circle until it reaches a point the given (x, y) distance away.",
"summary": "Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches a point the given (x, y) distance away.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -336057,8 +336057,8 @@
},
{
"name": "xLine",
"summary": "Draw a line relative to the current origin to a specified distance away",
"description": "from the current position along the 'x' axis.",
"summary": "Draw a line relative to the current origin to a specified distance away from the current position along the 'x' axis.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -341046,8 +341046,8 @@
},
{
"name": "xLineTo",
"summary": "Draw a line parallel to the X axis, that ends at the given X.",
"description": "E.g. if the previous line ended at (1, 1), then xLineTo(4) draws a line from (1, 1) to (4, 1)",
"summary": "Draw a line parallel to the X axis, that ends at the given X. E.g. if the previous line ended at (1, 1), then xLineTo(4) draws a line from (1, 1) to (4, 1)",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -346035,8 +346035,8 @@
},
{
"name": "yLine",
"summary": "Draw a line relative to the current origin to a specified distance away",
"description": "from the current position along the 'y' axis.",
"summary": "Draw a line relative to the current origin to a specified distance away from the current position along the 'y' axis.",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [
@ -351024,8 +351024,8 @@
},
{
"name": "yLineTo",
"summary": "Draw a line parallel to the Y axis, that ends at the given Y.",
"description": "E.g. if the previous line ended at (1, 1), then yLineTo(4) draws a line from (1, 1) to (1, 4)",
"summary": "Draw a line parallel to the Y axis, that ends at the given Y. E.g. if the previous line ended at (1, 1), then yLineTo(4) draws a line from (1, 1) to (1, 4)",
"description": "",
"tags": [],
"keywordArguments": false,
"args": [

View File

@ -14,7 +14,7 @@ sweep(
path: SweepPath,
sectional?: bool,
tolerance?: number,
) -> Solid
): Solid
```

View File

@ -9,7 +9,7 @@ Returns the angle coming out of the end of the segment in degrees.
```js
tangentToEnd(tag: TagIdentifier) -> number
tangentToEnd(tag: TagIdentifier): number
```

View File

@ -13,7 +13,7 @@ tangentialArc(
data: TangentialArcData,
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

View File

@ -1,19 +1,19 @@
---
title: "tangentialArcTo"
excerpt: "Starting at the current sketch's origin, draw a curved line segment along"
excerpt: "Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches the desired (x, y) coordinates."
layout: manual
---
Starting at the current sketch's origin, draw a curved line segment along
Starting at the current sketch's origin, draw a curved line segment along some part of an imaginary circle until it reaches the desired (x, y) coordinates.
some part of an imaginary circle until it reaches the desired (x, y) coordinates.
```js
tangentialArcTo(
to: [number],
sketch: Sketch,
tag?: TagDeclarator,
) -> Sketch
): Sketch
```

Some files were not shown because too many files have changed in this diff Show More