Start to rework some of our kcl docs (#3222)

* Start to rework some of our kcl docs

Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
This commit is contained in:
Paul Tagliamonte
2024-08-06 20:27:26 -04:00
committed by GitHub
parent 5cb5dbd689
commit e1c45bdb33
81 changed files with 423 additions and 343 deletions

View File

@ -1,10 +1,10 @@
--- ---
title: "abs" title: "abs"
excerpt: "Computes the absolute value of a number." excerpt: "Compute the absolute value of a number."
layout: manual layout: manual
--- ---
Computes the absolute value of a number. Compute the absolute value of a number.

View File

@ -1,10 +1,10 @@
--- ---
title: "acos" title: "acos"
excerpt: "Computes the arccosine of a number (in radians)." excerpt: "Compute the arccosine of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the arccosine of a number (in radians). Compute the arccosine of a number (in radians).

View File

@ -1,10 +1,10 @@
--- ---
title: "angleToMatchLengthX" title: "angleToMatchLengthX"
excerpt: "Returns the angle to match the given length for x." excerpt: "Compute the angle (in degrees) in o"
layout: manual layout: manual
--- ---
Returns the angle to match the given length for x. Compute the angle (in degrees) in o

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
--- ---
title: "angledLineToX" title: "angledLineToX"
excerpt: "Draw an angled line to a given x coordinate." excerpt: "Create a line segment from the current 2-dimensional sketch origin"
layout: manual layout: manual
--- ---
Draw an angled line to a given x coordinate. 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.
```js ```js
angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,12 +1,12 @@
--- ---
title: "angledLineToY" title: "angledLineToY"
excerpt: "Draw an angled line to a given y coordinate." excerpt: "Create a line segment from the current 2-dimensional sketch origin"
layout: manual layout: manual
--- ---
Draw an angled line to a given y coordinate. 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.
```js ```js
angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,12 +1,14 @@
--- ---
title: "arc" title: "arc"
excerpt: "Draw an arc." excerpt: "Starting at the current sketch's origin, draw a curved line segment along"
layout: manual layout: manual
--- ---
Draw an arc. Starting at the current sketch's origin, draw a curved line segment along
an imaginary circle of the specified radius.
The arc is constructed such that the current position of the sketch is placed along an imaginary circle of the specified radius, at angleStart degrees. The resulting arc is the segment of the imaginary circle from that origin point to angleEnd, radius away from the center of the imaginary circle.
Unless this makes a lot of sense and feels like what you're looking for to construct your shape, you're likely looking for tangentialArc.
```js ```js
arc(data: ArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup arc(data: ArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "asin" title: "asin"
excerpt: "Computes the arcsine of a number (in radians)." excerpt: "Compute the arcsine of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the arcsine of a number (in radians). Compute the arcsine of a number (in radians).

View File

@ -1,10 +1,10 @@
--- ---
title: "atan" title: "atan"
excerpt: "Computes the arctangent of a number (in radians)." excerpt: "Compute the arctangent of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the arctangent of a number (in radians). Compute the arctangent of a number (in radians).

View File

@ -1,12 +1,12 @@
--- ---
title: "bezierCurve" title: "bezierCurve"
excerpt: "Draw a bezier curve." excerpt: "Draw a smooth, continuous, curved line segment from the current origin to"
layout: manual layout: manual
--- ---
Draw a bezier curve. 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.
```js ```js
bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "ceil" title: "ceil"
excerpt: "Computes the smallest integer greater than or equal to a number." excerpt: "Compute the smallest integer greater than or equal to a number."
layout: manual layout: manual
--- ---
Computes the smallest integer greater than or equal to a number. Compute the smallest integer greater than or equal to a number.

View File

@ -1,12 +1,12 @@
--- ---
title: "chamfer" title: "chamfer"
excerpt: "Create chamfers on tagged paths." excerpt: "Cut a straight transitional edge along a tagged path."
layout: manual layout: manual
--- ---
Create chamfers on tagged paths. Cut a straight transitional edge along a tagged path.
Chamfer is similar in function and use to a fillet, except a fillet will blend the transition along an edge, rather than cut a sharp, straight transitional edge.
```js ```js
chamfer(data: ChamferData, extrude_group: ExtrudeGroup, tag?: TagDeclarator) -> ExtrudeGroup chamfer(data: ChamferData, extrude_group: ExtrudeGroup, tag?: TagDeclarator) -> ExtrudeGroup

View File

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

View File

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

View File

@ -1,10 +1,10 @@
--- ---
title: "cos" title: "cos"
excerpt: "Computes the cosine of a number (in radians)." excerpt: "Compute the cosine of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the cosine of a number (in radians). Compute the cosine of a number (in radians).

View File

@ -1,12 +1,12 @@
--- ---
title: "extrude" title: "extrude"
excerpt: "Extrudes by a given amount." excerpt: "Extend a 2-dimensional sketch through a third dimension in order to"
layout: manual layout: manual
--- ---
Extrudes by a given amount. 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.
```js ```js
extrude(length: number, sketch_group_set: SketchGroupSet) -> ExtrudeGroupSet extrude(length: number, sketch_group_set: SketchGroupSet) -> ExtrudeGroupSet

View File

@ -1,12 +1,12 @@
--- ---
title: "fillet" title: "fillet"
excerpt: "Create fillets on tagged paths." excerpt: "Blend a transitional edge along a tagged path, smoothing the sharp edge."
layout: manual layout: manual
--- ---
Create fillets on tagged paths. Blend a transitional edge along a tagged path, smoothing the sharp edge.
Fillet is similar in function and use to a chamfer, except a chamfer will cut a sharp transition along an edge while fillet will smoothly blend the transition.
```js ```js
fillet(data: FilletData, extrude_group: ExtrudeGroup, tag?: TagDeclarator) -> ExtrudeGroup fillet(data: FilletData, extrude_group: ExtrudeGroup, tag?: TagDeclarator) -> ExtrudeGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "floor" title: "floor"
excerpt: "Computes the largest integer less than or equal to a number." excerpt: "Compute the largest integer less than or equal to a number."
layout: manual layout: manual
--- ---
Computes the largest integer less than or equal to a number. Compute the largest integer less than or equal to a number.

View File

@ -1,10 +1,10 @@
--- ---
title: "hole" title: "hole"
excerpt: "Use a sketch to cut a hole in another sketch." excerpt: "Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch."
layout: manual layout: manual
--- ---
Use a sketch to cut a hole in another sketch. Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.

View File

@ -6,8 +6,8 @@ layout: manual
Import a CAD file. 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. For formats lacking unit data (such as STL, OBJ, or PLY files), the default unit of measurement is millimeters. Alternatively you may specify the unit by passing your desired measurement unit in the options parameter. When importing a GLTF file, the bin file will be imported as well. Import paths are relative to the current project directory.
Import paths are relative to the current project directory. This only works in the desktop app not in browser. Note: The import command currently only works when using the native Modeling App.
```js ```js
import(file_path: String, options?: ImportFormat) -> ImportedGeometry import(file_path: String, options?: ImportFormat) -> ImportedGeometry

View File

@ -1,10 +1,10 @@
--- ---
title: "int" title: "int"
excerpt: "Converts a number to an integer." excerpt: "Convert a number to an integer."
layout: manual layout: manual
--- ---
Converts a number to an integer. Convert a number to an integer.
Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero. Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero.
If the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error. If the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error.

File diff suppressed because one or more lines are too long

View File

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

View File

@ -1,10 +1,10 @@
--- ---
title: "legAngX" title: "legAngX"
excerpt: "Returns the angle of the given leg for x." excerpt: "Compute the angle of the given leg for x."
layout: manual layout: manual
--- ---
Returns the angle of the given leg for x. Compute the angle of the given leg for x.

View File

@ -1,10 +1,10 @@
--- ---
title: "legAngY" title: "legAngY"
excerpt: "Returns the angle of the given leg for y." excerpt: "Compute the angle of the given leg for y."
layout: manual layout: manual
--- ---
Returns the angle of the given leg for y. Compute the angle of the given leg for y.

View File

@ -1,10 +1,10 @@
--- ---
title: "legLen" title: "legLen"
excerpt: "Returns the length of the given leg." excerpt: "Compute the length of the given leg."
layout: manual layout: manual
--- ---
Returns the length of the given leg. Compute the length of the given leg.

View File

@ -1,12 +1,12 @@
--- ---
title: "line" title: "line"
excerpt: "Draw a line." excerpt: "Draw a line relative to the current origin to a specified (x, y) away"
layout: manual layout: manual
--- ---
Draw a line. Draw a line relative to the current origin to a specified (x, y) away
from the current position.
```js ```js
line(delta: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup line(delta: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "lineTo" title: "lineTo"
excerpt: "Draw a line to a point." excerpt: "Draw a line from the current origin to some absolute (x, y) point."
layout: manual layout: manual
--- ---
Draw a line to a point. Draw a line from the current origin to some absolute (x, y) point.

View File

@ -1,10 +1,10 @@
--- ---
title: "ln" title: "ln"
excerpt: "Computes the natural logarithm of the number." excerpt: "Compute the natural logarithm of the number."
layout: manual layout: manual
--- ---
Computes the natural logarithm of the number. Compute the natural logarithm of the number.

View File

@ -1,10 +1,10 @@
--- ---
title: "log" title: "log"
excerpt: "Computes the logarithm of the number with respect to an arbitrary base." excerpt: "Compute the logarithm of the number with respect to an arbitrary base."
layout: manual layout: manual
--- ---
Computes the logarithm of the number with respect to an arbitrary base. Compute 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. 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.

View File

@ -1,10 +1,10 @@
--- ---
title: "log10" title: "log10"
excerpt: "Computes the base 10 logarithm of the number." excerpt: "Compute the base 10 logarithm of the number."
layout: manual layout: manual
--- ---
Computes the base 10 logarithm of the number. Compute the base 10 logarithm of the number.

View File

@ -1,10 +1,10 @@
--- ---
title: "log2" title: "log2"
excerpt: "Computes the base 2 logarithm of the number." excerpt: "Compute the base 2 logarithm of the number."
layout: manual layout: manual
--- ---
Computes the base 2 logarithm of the number. Compute the base 2 logarithm of the number.

View File

@ -1,10 +1,10 @@
--- ---
title: "max" title: "max"
excerpt: "Computes the maximum of the given arguments." excerpt: "Compute the maximum of the given arguments."
layout: manual layout: manual
--- ---
Computes the maximum of the given arguments. Compute the maximum of the given arguments.

View File

@ -1,10 +1,10 @@
--- ---
title: "min" title: "min"
excerpt: "Computes the minimum of the given arguments." excerpt: "Compute the minimum of the given arguments."
layout: manual layout: manual
--- ---
Computes the minimum of the given arguments. Compute the minimum of the given arguments.

View File

@ -1,12 +1,12 @@
--- ---
title: "patternCircular2d" title: "patternCircular2d"
excerpt: "A circular pattern on a 2D sketch." excerpt: "Repeat a 2-dimensional sketch some number of times along a partial or"
layout: manual layout: manual
--- ---
A circular pattern on a 2D sketch. 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.
```js ```js
patternCircular2d(data: CircularPattern2dData, sketch_group_set: SketchGroupSet) -> [SketchGroup] patternCircular2d(data: CircularPattern2dData, sketch_group_set: SketchGroupSet) -> [SketchGroup]

View File

@ -1,12 +1,12 @@
--- ---
title: "patternCircular3d" title: "patternCircular3d"
excerpt: "A circular pattern on a 3D model." excerpt: "Repeat a 3-dimensional solid some number of times along a partial or"
layout: manual layout: manual
--- ---
A circular pattern on a 3D model. 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.
```js ```js
patternCircular3d(data: CircularPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup] patternCircular3d(data: CircularPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup]

View File

@ -1,12 +1,12 @@
--- ---
title: "patternLinear2d" title: "patternLinear2d"
excerpt: "A linear pattern on a 2D sketch." excerpt: "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount"
layout: manual layout: manual
--- ---
A linear pattern on a 2D sketch. Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
of distance between each repetition, some specified number of times.
```js ```js
patternLinear2d(data: LinearPattern2dData, sketch_group_set: SketchGroupSet) -> [SketchGroup] patternLinear2d(data: LinearPattern2dData, sketch_group_set: SketchGroupSet) -> [SketchGroup]

View File

@ -1,12 +1,12 @@
--- ---
title: "patternLinear3d" title: "patternLinear3d"
excerpt: "A linear pattern on a 3D model." excerpt: "Repeat a 3-dimensional solid along a linear path, with a dynamic amount"
layout: manual layout: manual
--- ---
A linear pattern on a 3D model. Repeat a 3-dimensional solid along a linear path, with a dynamic amount
of distance between each repetition, some specified number of times.
```js ```js
patternLinear3d(data: LinearPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup] patternLinear3d(data: LinearPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup]

View File

@ -1,12 +1,12 @@
--- ---
title: "patternTransform" title: "patternTransform"
excerpt: "A linear pattern on a 3D solid." excerpt: "Repeat a 3-dimensional solid by successively applying a transformation (such"
layout: manual layout: manual
--- ---
A linear pattern on a 3D solid. Repeat a 3-dimensional solid by successively applying a transformation (such
Each repetition of the pattern can be transformed (e.g. scaled, translated, hidden, etc). as rotation, scale, translation, visibility) on each repetition.
```js ```js
patternTransform(num_repetitions: u32, transform_function: FunctionParam, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup] patternTransform(num_repetitions: u32, transform_function: FunctionParam, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup]

View File

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

View File

@ -1,10 +1,10 @@
--- ---
title: "pow" title: "pow"
excerpt: "Computes the number to a power." excerpt: "Compute the number to a power."
layout: manual layout: manual
--- ---
Computes the number to a power. Compute the number to a power.

View File

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

View File

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

View File

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

View File

@ -1,12 +1,12 @@
--- ---
title: "revolve" title: "revolve"
excerpt: "Revolve a sketch around an axis." excerpt: "Rotate a sketch around some provided axis, creating a solid from its extent."
layout: manual layout: manual
--- ---
Revolve a sketch around an axis. Rotate a sketch around some provided axis, creating a solid from its extent.
This, like extrude, is able to create a 3-dimensional solid from a 2-dimensional sketch. However, unlike extrude, this creates a solid by using the extent of the sketch as its revolved around an axis rather than using the extent of the sketch linearly translated through a third dimension.
```js ```js
revolve(data: RevolveData, sketch_group: SketchGroup) -> ExtrudeGroup revolve(data: RevolveData, sketch_group: SketchGroup) -> ExtrudeGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "segAng" title: "segAng"
excerpt: "Returns the angle of the segment." excerpt: "Compute the angle (in degrees) of the provided line segment."
layout: manual layout: manual
--- ---
Returns the angle of the segment. Compute the angle (in degrees) of the provided line segment.

View File

@ -1,10 +1,10 @@
--- ---
title: "segEndX" title: "segEndX"
excerpt: "Returns the segment end of x." excerpt: "Compute the ending point of the provided line segment along the 'x' axis."
layout: manual layout: manual
--- ---
Returns the segment end of x. Compute the ending point of the provided line segment along the 'x' axis.

View File

@ -1,10 +1,10 @@
--- ---
title: "segEndY" title: "segEndY"
excerpt: "Returns the segment end of y." excerpt: "Compute the ending point of the provided line segment along the 'y' axis."
layout: manual layout: manual
--- ---
Returns the segment end of y. Compute the ending point of the provided line segment along the 'y' axis.

View File

@ -1,10 +1,10 @@
--- ---
title: "segLen" title: "segLen"
excerpt: "Returns the length of the segment." excerpt: "Compute the length of the provided line segment."
layout: manual layout: manual
--- ---
Returns the length of the segment. Compute the length of the provided line segment.

View File

@ -1,12 +1,12 @@
--- ---
title: "shell" title: "shell"
excerpt: "Shell a solid." excerpt: "Remove volume from a 3-dimensional shape such that a wall of the"
layout: manual layout: manual
--- ---
Shell a solid. 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.
```js ```js
shell(data: ShellData, extrude_group: ExtrudeGroup) -> ExtrudeGroup shell(data: ShellData, extrude_group: ExtrudeGroup) -> ExtrudeGroup

View File

@ -1,10 +1,10 @@
--- ---
title: "sin" title: "sin"
excerpt: "Computes the sine of a number (in radians)." excerpt: "Compute the sine of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the sine of a number (in radians). Compute the sine of a number (in radians).

View File

@ -1,10 +1,10 @@
--- ---
title: "sqrt" title: "sqrt"
excerpt: "Computes the square root of a number." excerpt: "Compute the square root of a number."
layout: manual layout: manual
--- ---
Computes the square root of a number. Compute the square root of a number.

View File

@ -1,10 +1,10 @@
--- ---
title: "startProfileAt" title: "startProfileAt"
excerpt: "Start a profile at a given point." excerpt: "Start a new profile at a given point."
layout: manual layout: manual
--- ---
Start a profile at a given point. Start a new profile at a given point.

View File

@ -1,10 +1,10 @@
--- ---
title: "startSketchAt" title: "startSketchAt"
excerpt: "Start a sketch at a given point on the 'XY' plane." excerpt: "Start a new 2-dimensional sketch at a given point on the 'XY' plane."
layout: manual layout: manual
--- ---
Start a sketch at a given point on the 'XY' plane. Start a new 2-dimensional sketch at a given point on the 'XY' plane.

View File

@ -1,10 +1,10 @@
--- ---
title: "startSketchOn" title: "startSketchOn"
excerpt: "Start a sketch on a specific plane or face." excerpt: "Start a new 2-dimensional sketch on a specific plane or face."
layout: manual layout: manual
--- ---
Start a sketch on a specific plane or face. Start a new 2-dimensional sketch on a specific plane or face.

View File

@ -1,7 +1,7 @@
[ [
{ {
"name": "abs", "name": "abs",
"summary": "Computes the absolute value of a number.", "summary": "Compute the absolute value of a number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -34,7 +34,7 @@
}, },
{ {
"name": "acos", "name": "acos",
"summary": "Computes the arccosine of a number (in radians).", "summary": "Compute the arccosine of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -67,7 +67,7 @@
}, },
{ {
"name": "angleToMatchLengthX", "name": "angleToMatchLengthX",
"summary": "Returns the angle to match the given length for x.", "summary": "Compute the angle (in degrees) in o",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -7623,8 +7623,8 @@
}, },
{ {
"name": "angledLine", "name": "angledLine",
"summary": "Draw an angled line.", "summary": "Draw a line segment relative to the current origin using the polar",
"description": "", "description": "measure of some angle and distance.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -14288,8 +14288,8 @@
}, },
{ {
"name": "angledLineOfXLength", "name": "angledLineOfXLength",
"summary": "Draw an angled line of a given x length.", "summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "", "description": "along some angle (in degrees) for some relative length in the 'x' dimension.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -20953,8 +20953,8 @@
}, },
{ {
"name": "angledLineOfYLength", "name": "angledLineOfYLength",
"summary": "Draw an angled line of a given y length.", "summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "", "description": "along some angle (in degrees) for some relative length in the 'y' dimension.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -27618,8 +27618,8 @@
}, },
{ {
"name": "angledLineThatIntersects", "name": "angledLineThatIntersects",
"summary": "Draw an angled line that intersects with a given line.", "summary": "Draw an angled line from the current origin, constructing a line segment",
"description": "", "description": "such that the newly created line intersects the desired target line segment.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -34726,8 +34726,8 @@
}, },
{ {
"name": "angledLineToX", "name": "angledLineToX",
"summary": "Draw an angled line to a given x coordinate.", "summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "", "description": "along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -41376,8 +41376,8 @@
}, },
{ {
"name": "angledLineToY", "name": "angledLineToY",
"summary": "Draw an angled line to a given y coordinate.", "summary": "Create a line segment from the current 2-dimensional sketch origin",
"description": "", "description": "along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -48026,8 +48026,8 @@
}, },
{ {
"name": "arc", "name": "arc",
"summary": "Draw an arc.", "summary": "Starting at the current sketch's origin, draw a curved line segment along",
"description": "", "description": "an imaginary circle of the specified radius.\nThe arc is constructed such that the current position of the sketch is placed along an imaginary circle of the specified radius, at angleStart degrees. The resulting arc is the segment of the imaginary circle from that origin point to angleEnd, radius away from the center of the imaginary circle.\nUnless this makes a lot of sense and feels like what you're looking for to construct your shape, you're likely looking for tangentialArc.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -54723,7 +54723,7 @@
}, },
{ {
"name": "asin", "name": "asin",
"summary": "Computes the arcsine of a number (in radians).", "summary": "Compute the arcsine of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -55037,7 +55037,7 @@
}, },
{ {
"name": "atan", "name": "atan",
"summary": "Computes the arctangent of a number (in radians).", "summary": "Compute the arctangent of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -55070,8 +55070,8 @@
}, },
{ {
"name": "bezierCurve", "name": "bezierCurve",
"summary": "Draw a bezier curve.", "summary": "Draw a smooth, continuous, curved line segment from the current origin to",
"description": "", "description": "the desired (x, y), using a number of control points to shape the curve's shape.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -61741,7 +61741,7 @@
}, },
{ {
"name": "ceil", "name": "ceil",
"summary": "Computes the smallest integer greater than or equal to a number.", "summary": "Compute the smallest integer greater than or equal to a number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -61774,8 +61774,8 @@
}, },
{ {
"name": "chamfer", "name": "chamfer",
"summary": "Create chamfers on tagged paths.", "summary": "Cut a straight transitional edge along a tagged path.",
"description": "", "description": "Chamfer is similar in function and use to a fillet, except a fillet will blend the transition along an edge, rather than cut a sharp, straight transitional edge.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -67436,8 +67436,8 @@
}, },
{ {
"name": "circle", "name": "circle",
"summary": "Sketch a circle.", "summary": "Construct a 2-dimensional circle, of the specified radius, centered at",
"description": "", "description": "the provided (x, y) origin point.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -74895,8 +74895,8 @@
}, },
{ {
"name": "close", "name": "close",
"summary": "Close the current sketch.", "summary": "Construct a line segment from the current origin back to the profile's",
"description": "", "description": "origin, ensuring the resulting 2-dimensional sketch is not open-ended.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -81521,7 +81521,7 @@
}, },
{ {
"name": "cos", "name": "cos",
"summary": "Computes the cosine of a number (in radians).", "summary": "Compute the cosine of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -81577,8 +81577,8 @@
}, },
{ {
"name": "extrude", "name": "extrude",
"summary": "Extrudes by a given amount.", "summary": "Extend a 2-dimensional sketch through a third dimension in order to",
"description": "", "description": "create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -91589,8 +91589,8 @@
}, },
{ {
"name": "fillet", "name": "fillet",
"summary": "Create fillets on tagged paths.", "summary": "Blend a transitional edge along a tagged path, smoothing the sharp edge.",
"description": "", "description": "Fillet is similar in function and use to a chamfer, except a chamfer will cut a sharp transition along an edge while fillet will smoothly blend the transition.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -97251,7 +97251,7 @@
}, },
{ {
"name": "floor", "name": "floor",
"summary": "Computes the largest integer less than or equal to a number.", "summary": "Compute the largest integer less than or equal to a number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -103900,7 +103900,7 @@
}, },
{ {
"name": "hole", "name": "hole",
"summary": "Use a sketch to cut a hole in another sketch.", "summary": "Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -115845,7 +115845,7 @@
{ {
"name": "import", "name": "import",
"summary": "Import a CAD file.", "summary": "Import a CAD file.",
"description": "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.\nImport paths are relative to the current project directory. This only works in the desktop app not in browser.", "description": "For formats lacking unit data (such as STL, OBJ, or PLY files), the default unit of measurement is millimeters. Alternatively you may specify the unit by passing your desired measurement unit in the options parameter. When importing a GLTF file, the bin file will be imported as well. Import paths are relative to the current project directory.\nNote: The import command currently only works when using the native Modeling App.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -116501,7 +116501,7 @@
}, },
{ {
"name": "int", "name": "int",
"summary": "Converts a number to an integer.", "summary": "Convert a number to an integer.",
"description": "Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero.\nIf the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error.", "description": "Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero.\nIf the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error.",
"tags": [ "tags": [
"convert" "convert"
@ -116534,8 +116534,8 @@
}, },
{ {
"name": "lastSegX", "name": "lastSegX",
"summary": "Returns the last segment of x.", "summary": "Extract the 'x' axis value of the last line segment in the provided 2-d",
"description": "", "description": "sketch.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -119837,13 +119837,13 @@
"unpublished": false, "unpublished": false,
"deprecated": false, "deprecated": false,
"examples": [ "examples": [
"const exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([0, lastSegX(%)], %)\n |> line([-15, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)" "const exampleSketch = startSketchOn(\"XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([lastSegX(%), 0], %)\n |> line([-15, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
] ]
}, },
{ {
"name": "lastSegY", "name": "lastSegY",
"summary": "Returns the last segment of y.", "summary": "Extract the 'y' axis value of the last line segment in the provided 2-d",
"description": "", "description": "sketch.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -123150,7 +123150,7 @@
}, },
{ {
"name": "legAngX", "name": "legAngX",
"summary": "Returns the angle of the given leg for x.", "summary": "Compute the angle of the given leg for x.",
"description": "", "description": "",
"tags": [ "tags": [
"utilities" "utilities"
@ -123192,7 +123192,7 @@
}, },
{ {
"name": "legAngY", "name": "legAngY",
"summary": "Returns the angle of the given leg for y.", "summary": "Compute the angle of the given leg for y.",
"description": "", "description": "",
"tags": [ "tags": [
"utilities" "utilities"
@ -123234,7 +123234,7 @@
}, },
{ {
"name": "legLen", "name": "legLen",
"summary": "Returns the length of the given leg.", "summary": "Compute the length of the given leg.",
"description": "", "description": "",
"tags": [ "tags": [
"utilities" "utilities"
@ -123276,8 +123276,8 @@
}, },
{ {
"name": "line", "name": "line",
"summary": "Draw a line.", "summary": "Draw a line relative to the current origin to a specified (x, y) away",
"description": "", "description": "from the current position.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -129916,7 +129916,7 @@
}, },
{ {
"name": "lineTo", "name": "lineTo",
"summary": "Draw a line to a point.", "summary": "Draw a line from the current origin to some absolute (x, y) point.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -136555,7 +136555,7 @@
}, },
{ {
"name": "ln", "name": "ln",
"summary": "Computes the natural logarithm of the number.", "summary": "Compute the natural logarithm of the number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -136588,7 +136588,7 @@
}, },
{ {
"name": "log", "name": "log",
"summary": "Computes the logarithm of the number with respect to an arbitrary base.", "summary": "Compute the logarithm of the number with respect to an arbitrary base.",
"description": "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.", "description": "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.",
"tags": [ "tags": [
"math" "math"
@ -136630,7 +136630,7 @@
}, },
{ {
"name": "log10", "name": "log10",
"summary": "Computes the base 10 logarithm of the number.", "summary": "Compute the base 10 logarithm of the number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -136663,7 +136663,7 @@
}, },
{ {
"name": "log2", "name": "log2",
"summary": "Computes the base 2 logarithm of the number.", "summary": "Compute the base 2 logarithm of the number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -136696,7 +136696,7 @@
}, },
{ {
"name": "max", "name": "max",
"summary": "Computes the maximum of the given arguments.", "summary": "Compute the maximum of the given arguments.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -136732,7 +136732,7 @@
}, },
{ {
"name": "min", "name": "min",
"summary": "Computes the minimum of the given arguments.", "summary": "Compute the minimum of the given arguments.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -136768,8 +136768,8 @@
}, },
{ {
"name": "patternCircular2d", "name": "patternCircular2d",
"summary": "A circular pattern on a 2D sketch.", "summary": "Repeat a 2-dimensional sketch some number of times along a partial or",
"description": "", "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.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -144232,8 +144232,8 @@
}, },
{ {
"name": "patternCircular3d", "name": "patternCircular3d",
"summary": "A circular pattern on a 3D model.", "summary": "Repeat a 3-dimensional solid some number of times along a partial or",
"description": "", "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.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -150980,8 +150980,8 @@
}, },
{ {
"name": "patternLinear2d", "name": "patternLinear2d",
"summary": "A linear pattern on a 2D sketch.", "summary": "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount",
"description": "", "description": "of distance between each repetition, some specified number of times.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -158439,8 +158439,8 @@
}, },
{ {
"name": "patternLinear3d", "name": "patternLinear3d",
"summary": "A linear pattern on a 3D model.", "summary": "Repeat a 3-dimensional solid along a linear path, with a dynamic amount",
"description": "", "description": "of distance between each repetition, some specified number of times.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -165171,8 +165171,8 @@
}, },
{ {
"name": "patternTransform", "name": "patternTransform",
"summary": "A linear pattern on a 3D solid.", "summary": "Repeat a 3-dimensional solid by successively applying a transformation (such",
"description": "Each repetition of the pattern can be transformed (e.g. scaled, translated, hidden, etc).", "description": "as rotation, scale, translation, visibility) on each repetition.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -171907,8 +171907,8 @@
}, },
{ {
"name": "polar", "name": "polar",
"summary": "Convert from polar/sphere coordinates to cartesian coordinates.", "summary": "Convert polar/sphere (azimuth, elevation, distance) coordinates to",
"description": "", "description": "cartesian (x/y/z grid) coordinates.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -171959,7 +171959,7 @@
}, },
{ {
"name": "pow", "name": "pow",
"summary": "Computes the number to a power.", "summary": "Compute the number to a power.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -172001,8 +172001,8 @@
}, },
{ {
"name": "profileStart", "name": "profileStart",
"summary": "", "summary": "Extract the provided 2-dimensional sketch group's profile's origin",
"description": "", "description": "value.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -175314,8 +175314,8 @@
}, },
{ {
"name": "profileStartX", "name": "profileStartX",
"summary": "", "summary": "Extract the provided 2-dimensional sketch group's profile's origin's 'x'",
"description": "", "description": "value.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -178622,8 +178622,8 @@
}, },
{ {
"name": "profileStartY", "name": "profileStartY",
"summary": "", "summary": "Extract the provided 2-dimensional sketch group's profile's origin's 'y'",
"description": "", "description": "value.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -181930,8 +181930,8 @@
}, },
{ {
"name": "revolve", "name": "revolve",
"summary": "Revolve a sketch around an axis.", "summary": "Rotate a sketch around some provided axis, creating a solid from its extent.",
"description": "", "description": "This, like extrude, is able to create a 3-dimensional solid from a 2-dimensional sketch. However, unlike extrude, this creates a solid by using the extent of the sketch as its revolved around an axis rather than using the extent of the sketch linearly translated through a third dimension.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -188372,7 +188372,7 @@
}, },
{ {
"name": "segAng", "name": "segAng",
"summary": "Returns the angle of the segment.", "summary": "Compute the angle (in degrees) of the provided line segment.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -188855,7 +188855,7 @@
}, },
{ {
"name": "segEndX", "name": "segEndX",
"summary": "Returns the segment end of x.", "summary": "Compute the ending point of the provided line segment along the 'x' axis.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -189338,7 +189338,7 @@
}, },
{ {
"name": "segEndY", "name": "segEndY",
"summary": "Returns the segment end of y.", "summary": "Compute the ending point of the provided line segment along the 'y' axis.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -189821,7 +189821,7 @@
}, },
{ {
"name": "segLen", "name": "segLen",
"summary": "Returns the length of the segment.", "summary": "Compute the length of the provided line segment.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -190304,8 +190304,8 @@
}, },
{ {
"name": "shell", "name": "shell",
"summary": "Shell a solid.", "summary": "Remove volume from a 3-dimensional shape such that a wall of the",
"description": "", "description": "provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -195939,7 +195939,7 @@
}, },
{ {
"name": "sin", "name": "sin",
"summary": "Computes the sine of a number (in radians).", "summary": "Compute the sine of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -195972,7 +195972,7 @@
}, },
{ {
"name": "sqrt", "name": "sqrt",
"summary": "Computes the square root of a number.", "summary": "Compute the square root of a number.",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -196005,7 +196005,7 @@
}, },
{ {
"name": "startProfileAt", "name": "startProfileAt",
"summary": "Start a profile at a given point.", "summary": "Start a new profile at a given point.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -201698,7 +201698,7 @@
}, },
{ {
"name": "startSketchAt", "name": "startSketchAt",
"summary": "Start a sketch at a given point on the 'XY' plane.", "summary": "Start a new 2-dimensional sketch at a given point on the 'XY' plane.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -205013,7 +205013,7 @@
}, },
{ {
"name": "startSketchOn", "name": "startSketchOn",
"summary": "Start a sketch on a specific plane or face.", "summary": "Start a new 2-dimensional sketch on a specific plane or face.",
"description": "", "description": "",
"tags": [], "tags": [],
"args": [ "args": [
@ -210066,7 +210066,7 @@
}, },
{ {
"name": "tan", "name": "tan",
"summary": "Computes the tangent of a number (in radians).", "summary": "Compute the tangent of a number (in radians).",
"description": "", "description": "",
"tags": [ "tags": [
"math" "math"
@ -210099,8 +210099,8 @@
}, },
{ {
"name": "tangentialArc", "name": "tangentialArc",
"summary": "Draw an arc.", "summary": "Starting at the current sketch's origin, draw a curved line segment along",
"description": "", "description": "some part of an imaginary circle of the specified radius.\nThe arc is constructed such that the last line segment is placed tangent to the imaginary circle of the specified radius. The resulting arc is the segment of the imaginary circle from that tangent point for 'offset' degrees along the imaginary circle.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -216763,8 +216763,8 @@
}, },
{ {
"name": "tangentialArcTo", "name": "tangentialArcTo",
"summary": "Draw an arc.", "summary": "Starting at the current sketch's origin, draw a curved line segment along",
"description": "", "description": "some part of an imaginary circle until it reaches the desired (x, y) coordinates.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -223491,8 +223491,8 @@
}, },
{ {
"name": "xLine", "name": "xLine",
"summary": "Draw a line parallel to the X-axis, with the given length.", "summary": "Draw a line relative to the current origin to a specified distance away",
"description": "", "description": "from the current position along the 'x' axis.",
"tags": [], "tags": [],
"args": [ "args": [
{ {
@ -236759,8 +236759,8 @@
}, },
{ {
"name": "yLine", "name": "yLine",
"summary": "Draw a line parallel to the Y-axis, with the given length.", "summary": "Draw a line relative to the current origin to a specified distance away",
"description": "", "description": "from the current position along the 'y' axis.",
"tags": [], "tags": [],
"args": [ "args": [
{ {

View File

@ -1,10 +1,10 @@
--- ---
title: "tan" title: "tan"
excerpt: "Computes the tangent of a number (in radians)." excerpt: "Compute the tangent of a number (in radians)."
layout: manual layout: manual
--- ---
Computes the tangent of a number (in radians). Compute the tangent of a number (in radians).

View File

@ -1,12 +1,13 @@
--- ---
title: "tangentialArc" title: "tangentialArc"
excerpt: "Draw an arc." excerpt: "Starting at the current sketch's origin, draw a curved line segment along"
layout: manual layout: manual
--- ---
Draw an arc. Starting at the current sketch's origin, draw a curved line segment along
some part of an imaginary circle of the specified radius.
The arc is constructed such that the last line segment is placed tangent to the imaginary circle of the specified radius. The resulting arc is the segment of the imaginary circle from that tangent point for 'offset' degrees along the imaginary circle.
```js ```js
tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,12 +1,12 @@
--- ---
title: "tangentialArcTo" title: "tangentialArcTo"
excerpt: "Draw an arc." excerpt: "Starting at the current sketch's origin, draw a curved line segment along"
layout: manual layout: manual
--- ---
Draw an arc. 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.
```js ```js
tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,12 +1,12 @@
--- ---
title: "xLine" title: "xLine"
excerpt: "Draw a line parallel to the X-axis, with the given length." excerpt: "Draw a line relative to the current origin to a specified distance away"
layout: manual layout: manual
--- ---
Draw a line parallel to the X-axis, with the given length. Draw a line relative to the current origin to a specified distance away
from the current position along the 'x' axis.
```js ```js
xLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup xLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -1,12 +1,12 @@
--- ---
title: "yLine" title: "yLine"
excerpt: "Draw a line parallel to the Y-axis, with the given length." excerpt: "Draw a line relative to the current origin to a specified distance away"
layout: manual layout: manual
--- ---
Draw a line parallel to the Y-axis, with the given length. Draw a line relative to the current origin to a specified distance away
from the current position along the 'y' axis.
```js ```js
yLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup yLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup

View File

@ -742,7 +742,9 @@ test.describe('Editor tests', () => {
await page.getByText('startSketchOn').hover() await page.getByText('startSketchOn').hover()
await expect(page.locator('.hover-tooltip')).toBeVisible() await expect(page.locator('.hover-tooltip')).toBeVisible()
await expect( await expect(
page.getByText('Start a sketch on a specific plane or face') page.getByText(
'Start a new 2-dimensional sketch on a specific plane or face'
)
).toBeVisible() ).toBeVisible()
// Hover over the line function // Hover over the line function

View File

@ -837,7 +837,7 @@ async fn test_kcl_lsp_on_hover() {
// Check the hover. // Check the hover.
if let Some(hover) = hover { if let Some(hover) = hover {
assert_eq!(hover.contents, tower_lsp::lsp_types::HoverContents::Markup(tower_lsp::lsp_types::MarkupContent { kind: tower_lsp::lsp_types::MarkupKind::Markdown, value: "```startSketchOn(data: SketchData, tag?: FaceTag) -> SketchSurface```\nStart a sketch on a specific plane or face.".to_string() })); assert_eq!(hover.contents, tower_lsp::lsp_types::HoverContents::Markup(tower_lsp::lsp_types::MarkupContent { kind: tower_lsp::lsp_types::MarkupKind::Markdown, value: "```startSketchOn(data: SketchData, tag?: FaceTag) -> SketchSurface```\nStart a new 2-dimensional sketch on a specific plane or face.".to_string() }));
} else { } else {
panic!("Expected hover"); panic!("Expected hover");
} }

View File

@ -35,7 +35,11 @@ pub async fn chamfer(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::ExtrudeGroup(extrude_group)) Ok(MemoryItem::ExtrudeGroup(extrude_group))
} }
/// Create chamfers on tagged paths. /// Cut a straight transitional edge along a tagged path.
///
/// Chamfer is similar in function and use to a fillet, except
/// a fillet will blend the transition along an edge, rather than cut
/// a sharp, straight transitional edge.
/// ///
/// ```no_run /// ```no_run
/// const width = 20 /// const width = 20

View File

@ -38,7 +38,7 @@ pub async fn int(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_i64(converted) args.make_user_val_from_i64(converted)
} }
/// Converts a number to an integer. /// Convert a number to an integer.
/// ///
/// Callers should use floor(), ceil(), or other rounding function first if they /// Callers should use floor(), ceil(), or other rounding function first if they
/// care about how numbers with fractional parts are converted. If the number /// care about how numbers with fractional parts are converted. If the number

View File

@ -23,7 +23,9 @@ pub async fn extrude(args: Args) -> Result<MemoryItem, KclError> {
Ok(result.into()) Ok(result.into())
} }
/// Extrudes by a given amount. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const example = startSketchOn('XZ') /// const example = startSketchOn('XZ')

View File

@ -49,7 +49,11 @@ pub async fn fillet(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::ExtrudeGroup(extrude_group)) Ok(MemoryItem::ExtrudeGroup(extrude_group))
} }
/// Create fillets on tagged paths. /// Blend a transitional edge along a tagged path, smoothing the sharp edge.
///
/// Fillet is similar in function and use to a chamfer, except
/// a chamfer will cut a sharp transition along an edge while fillet
/// will smoothly blend the transition.
/// ///
/// ```no_run /// ```no_run
/// const width = 20 /// const width = 20

View File

@ -121,12 +121,15 @@ pub async fn import(args: Args) -> Result<MemoryItem, KclError> {
} }
/// Import a CAD file. /// 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 /// For formats lacking unit data (such as STL, OBJ, or PLY files), the default
/// not in browser. /// unit of measurement is millimeters. Alternatively you may specify the unit
/// by passing your desired measurement unit in the options parameter. When
/// importing a GLTF file, the bin file will be imported as well. Import paths
/// are relative to the current project directory.
///
/// Note: The import command currently only works when using the native
/// Modeling App.
/// ///
/// ```no_run /// ```no_run
/// const model = import("tests/inputs/cube.obj") /// const model = import("tests/inputs/cube.obj")

View File

@ -10,7 +10,7 @@ use crate::{
std::Args, std::Args,
}; };
/// Computes the cosine of a number (in radians). /// Compute the cosine of a number (in radians).
pub async fn cos(args: Args) -> Result<MemoryItem, KclError> { pub async fn cos(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_cos(num)?; let result = inner_cos(num)?;
@ -18,7 +18,7 @@ pub async fn cos(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the cosine of a number (in radians). /// Compute the cosine of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -40,7 +40,7 @@ fn inner_cos(num: f64) -> Result<f64, KclError> {
Ok(num.cos()) Ok(num.cos())
} }
/// Computes the sine of a number (in radians). /// Compute the sine of a number (in radians).
pub async fn sin(args: Args) -> Result<MemoryItem, KclError> { pub async fn sin(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_sin(num)?; let result = inner_sin(num)?;
@ -48,7 +48,7 @@ pub async fn sin(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the sine of a number (in radians). /// Compute the sine of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -70,7 +70,7 @@ fn inner_sin(num: f64) -> Result<f64, KclError> {
Ok(num.sin()) Ok(num.sin())
} }
/// Computes the tangent of a number (in radians). /// Compute the tangent of a number (in radians).
pub async fn tan(args: Args) -> Result<MemoryItem, KclError> { pub async fn tan(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_tan(num)?; let result = inner_tan(num)?;
@ -78,7 +78,7 @@ pub async fn tan(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the tangent of a number (in radians). /// Compute the tangent of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -125,7 +125,7 @@ fn inner_pi() -> Result<f64, KclError> {
Ok(std::f64::consts::PI) Ok(std::f64::consts::PI)
} }
/// Computes the square root of a number. /// Compute the square root of a number.
pub async fn sqrt(args: Args) -> Result<MemoryItem, KclError> { pub async fn sqrt(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_sqrt(num)?; let result = inner_sqrt(num)?;
@ -133,7 +133,7 @@ pub async fn sqrt(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the square root of a number. /// Compute the square root of a number.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -155,7 +155,7 @@ fn inner_sqrt(num: f64) -> Result<f64, KclError> {
Ok(num.sqrt()) Ok(num.sqrt())
} }
/// Computes the absolute value of a number. /// Compute the absolute value of a number.
pub async fn abs(args: Args) -> Result<MemoryItem, KclError> { pub async fn abs(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_abs(num)?; let result = inner_abs(num)?;
@ -163,7 +163,7 @@ pub async fn abs(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the absolute value of a number. /// Compute the absolute value of a number.
/// ///
/// ```no_run /// ```no_run
/// const myAngle = -120 /// const myAngle = -120
@ -192,7 +192,7 @@ fn inner_abs(num: f64) -> Result<f64, KclError> {
Ok(num.abs()) Ok(num.abs())
} }
/// Computes the largest integer less than or equal to a number. /// Compute the largest integer less than or equal to a number.
pub async fn floor(args: Args) -> Result<MemoryItem, KclError> { pub async fn floor(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_floor(num)?; let result = inner_floor(num)?;
@ -200,7 +200,7 @@ pub async fn floor(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the largest integer less than or equal to a number. /// Compute the largest integer less than or equal to a number.
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -220,7 +220,7 @@ fn inner_floor(num: f64) -> Result<f64, KclError> {
Ok(num.floor()) Ok(num.floor())
} }
/// Computes the smallest integer greater than or equal to a number. /// Compute the smallest integer greater than or equal to a number.
pub async fn ceil(args: Args) -> Result<MemoryItem, KclError> { pub async fn ceil(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_ceil(num)?; let result = inner_ceil(num)?;
@ -228,7 +228,7 @@ pub async fn ceil(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the smallest integer greater than or equal to a number. /// Compute the smallest integer greater than or equal to a number.
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -248,7 +248,7 @@ fn inner_ceil(num: f64) -> Result<f64, KclError> {
Ok(num.ceil()) Ok(num.ceil())
} }
/// Computes the minimum of the given arguments. /// Compute the minimum of the given arguments.
pub async fn min(args: Args) -> Result<MemoryItem, KclError> { pub async fn min(args: Args) -> Result<MemoryItem, KclError> {
let nums = args.get_number_array()?; let nums = args.get_number_array()?;
let result = inner_min(nums); let result = inner_min(nums);
@ -256,7 +256,7 @@ pub async fn min(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the minimum of the given arguments. /// Compute the minimum of the given arguments.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -285,7 +285,7 @@ fn inner_min(args: Vec<f64>) -> f64 {
min min
} }
/// Computes the maximum of the given arguments. /// Compute the maximum of the given arguments.
pub async fn max(args: Args) -> Result<MemoryItem, KclError> { pub async fn max(args: Args) -> Result<MemoryItem, KclError> {
let nums = args.get_number_array()?; let nums = args.get_number_array()?;
let result = inner_max(nums); let result = inner_max(nums);
@ -293,7 +293,7 @@ pub async fn max(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the maximum of the given arguments. /// Compute the maximum of the given arguments.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -322,7 +322,7 @@ fn inner_max(args: Vec<f64>) -> f64 {
max max
} }
/// Computes the number to a power. /// Compute the number to a power.
pub async fn pow(args: Args) -> Result<MemoryItem, KclError> { pub async fn pow(args: Args) -> Result<MemoryItem, KclError> {
let nums = args.get_number_array()?; let nums = args.get_number_array()?;
if nums.len() > 2 { if nums.len() > 2 {
@ -344,7 +344,7 @@ pub async fn pow(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the number to a power. /// Compute the number to a power.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -366,7 +366,7 @@ fn inner_pow(num: f64, pow: f64) -> Result<f64, KclError> {
Ok(num.powf(pow)) Ok(num.powf(pow))
} }
/// Computes the arccosine of a number (in radians). /// Compute the arccosine of a number (in radians).
pub async fn acos(args: Args) -> Result<MemoryItem, KclError> { pub async fn acos(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_acos(num)?; let result = inner_acos(num)?;
@ -374,7 +374,7 @@ pub async fn acos(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the arccosine of a number (in radians). /// Compute the arccosine of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -397,7 +397,7 @@ fn inner_acos(num: f64) -> Result<f64, KclError> {
Ok(num.acos()) Ok(num.acos())
} }
/// Computes the arcsine of a number (in radians). /// Compute the arcsine of a number (in radians).
pub async fn asin(args: Args) -> Result<MemoryItem, KclError> { pub async fn asin(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_asin(num)?; let result = inner_asin(num)?;
@ -405,7 +405,7 @@ pub async fn asin(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the arcsine of a number (in radians). /// Compute the arcsine of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -427,7 +427,7 @@ fn inner_asin(num: f64) -> Result<f64, KclError> {
Ok(num.asin()) Ok(num.asin())
} }
/// Computes the arctangent of a number (in radians). /// Compute the arctangent of a number (in radians).
pub async fn atan(args: Args) -> Result<MemoryItem, KclError> { pub async fn atan(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_atan(num)?; let result = inner_atan(num)?;
@ -435,7 +435,7 @@ pub async fn atan(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the arctangent of a number (in radians). /// Compute the arctangent of a number (in radians).
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -457,7 +457,7 @@ fn inner_atan(num: f64) -> Result<f64, KclError> {
Ok(num.atan()) Ok(num.atan())
} }
/// Computes the logarithm of the number with respect to an arbitrary base. /// Compute the logarithm of the number with respect to an arbitrary base.
/// ///
/// The result might not be correctly rounded owing to implementation /// The result might not be correctly rounded owing to implementation
/// details; `log2()` can produce more accurate results for base 2, /// details; `log2()` can produce more accurate results for base 2,
@ -482,7 +482,7 @@ pub async fn log(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the logarithm of the number with respect to an arbitrary base. /// Compute the logarithm of the number with respect to an arbitrary base.
/// ///
/// The result might not be correctly rounded owing to implementation /// The result might not be correctly rounded owing to implementation
/// details; `log2()` can produce more accurate results for base 2, /// details; `log2()` can produce more accurate results for base 2,
@ -506,7 +506,7 @@ fn inner_log(num: f64, base: f64) -> Result<f64, KclError> {
Ok(num.log(base)) Ok(num.log(base))
} }
/// Computes the base 2 logarithm of the number. /// Compute the base 2 logarithm of the number.
pub async fn log2(args: Args) -> Result<MemoryItem, KclError> { pub async fn log2(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_log2(num)?; let result = inner_log2(num)?;
@ -514,7 +514,7 @@ pub async fn log2(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the base 2 logarithm of the number. /// Compute the base 2 logarithm of the number.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -534,7 +534,7 @@ fn inner_log2(num: f64) -> Result<f64, KclError> {
Ok(num.log2()) Ok(num.log2())
} }
/// Computes the base 10 logarithm of the number. /// Compute the base 10 logarithm of the number.
pub async fn log10(args: Args) -> Result<MemoryItem, KclError> { pub async fn log10(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_log10(num)?; let result = inner_log10(num)?;
@ -542,7 +542,7 @@ pub async fn log10(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the base 10 logarithm of the number. /// Compute the base 10 logarithm of the number.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -562,7 +562,7 @@ fn inner_log10(num: f64) -> Result<f64, KclError> {
Ok(num.log10()) Ok(num.log10())
} }
/// Computes the natural logarithm of the number. /// Compute the natural logarithm of the number.
pub async fn ln(args: Args) -> Result<MemoryItem, KclError> { pub async fn ln(args: Args) -> Result<MemoryItem, KclError> {
let num = args.get_number()?; let num = args.get_number()?;
let result = inner_ln(num)?; let result = inner_ln(num)?;
@ -570,7 +570,7 @@ pub async fn ln(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Computes the natural logarithm of the number. /// Compute the natural logarithm of the number.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")

View File

@ -212,14 +212,14 @@ pub enum FunctionKind {
UserDefined, UserDefined,
} }
/// Returns the length of the given leg. /// Compute the length of the given leg.
pub async fn leg_length(args: Args) -> Result<MemoryItem, KclError> { pub async fn leg_length(args: Args) -> Result<MemoryItem, KclError> {
let (hypotenuse, leg) = args.get_hypotenuse_leg()?; let (hypotenuse, leg) = args.get_hypotenuse_leg()?;
let result = inner_leg_length(hypotenuse, leg); let result = inner_leg_length(hypotenuse, leg);
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the length of the given leg. /// Compute the length of the given leg.
/// ///
/// ```no_run /// ```no_run
/// legLen(5, 3) /// legLen(5, 3)
@ -232,14 +232,14 @@ fn inner_leg_length(hypotenuse: f64, leg: f64) -> f64 {
(hypotenuse.powi(2) - f64::min(hypotenuse.abs(), leg.abs()).powi(2)).sqrt() (hypotenuse.powi(2) - f64::min(hypotenuse.abs(), leg.abs()).powi(2)).sqrt()
} }
/// Returns the angle of the given leg for x. /// Compute the angle of the given leg for x.
pub async fn leg_angle_x(args: Args) -> Result<MemoryItem, KclError> { pub async fn leg_angle_x(args: Args) -> Result<MemoryItem, KclError> {
let (hypotenuse, leg) = args.get_hypotenuse_leg()?; let (hypotenuse, leg) = args.get_hypotenuse_leg()?;
let result = inner_leg_angle_x(hypotenuse, leg); let result = inner_leg_angle_x(hypotenuse, leg);
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the angle of the given leg for x. /// Compute the angle of the given leg for x.
/// ///
/// ```no_run /// ```no_run
/// legAngX(5, 3) /// legAngX(5, 3)
@ -252,14 +252,14 @@ fn inner_leg_angle_x(hypotenuse: f64, leg: f64) -> f64 {
(leg.min(hypotenuse) / hypotenuse).acos().to_degrees() (leg.min(hypotenuse) / hypotenuse).acos().to_degrees()
} }
/// Returns the angle of the given leg for y. /// Compute the angle of the given leg for y.
pub async fn leg_angle_y(args: Args) -> Result<MemoryItem, KclError> { pub async fn leg_angle_y(args: Args) -> Result<MemoryItem, KclError> {
let (hypotenuse, leg) = args.get_hypotenuse_leg()?; let (hypotenuse, leg) = args.get_hypotenuse_leg()?;
let result = inner_leg_angle_y(hypotenuse, leg); let result = inner_leg_angle_y(hypotenuse, leg);
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the angle of the given leg for y. /// Compute the angle of the given leg for y.
/// ///
/// ```no_run /// ```no_run
/// legAngY(5, 3) /// legAngY(5, 3)

View File

@ -97,8 +97,8 @@ pub async fn pattern_transform(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::ExtrudeGroups { value: extrude_groups }) Ok(MemoryItem::ExtrudeGroups { value: extrude_groups })
} }
/// A linear pattern on a 3D solid. /// Repeat a 3-dimensional solid by successively applying a transformation (such
/// Each repetition of the pattern can be transformed (e.g. scaled, translated, hidden, etc). /// as rotation, scale, translation, visibility) on each repetition.
/// ///
/// ```no_run /// ```no_run
/// // Parameters /// // Parameters
@ -319,7 +319,8 @@ pub async fn pattern_linear_2d(args: Args) -> Result<MemoryItem, KclError> {
Ok(sketch_groups.into()) Ok(sketch_groups.into())
} }
/// A linear pattern on a 2D sketch. /// Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
/// of distance between each repetition, some specified number of times.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -385,7 +386,8 @@ pub async fn pattern_linear_3d(args: Args) -> Result<MemoryItem, KclError> {
Ok(extrude_groups.into()) Ok(extrude_groups.into())
} }
/// A linear pattern on a 3D model. /// Repeat a 3-dimensional solid along a linear path, with a dynamic amount
/// of distance between each repetition, some specified number of times.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -583,7 +585,10 @@ pub async fn pattern_circular_2d(args: Args) -> Result<MemoryItem, KclError> {
Ok(sketch_groups.into()) Ok(sketch_groups.into())
} }
/// A circular pattern on a 2D sketch. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -645,7 +650,10 @@ pub async fn pattern_circular_3d(args: Args) -> Result<MemoryItem, KclError> {
Ok(extrude_groups.into()) Ok(extrude_groups.into())
} }
/// A circular pattern on a 3D model. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')

View File

@ -26,7 +26,8 @@ pub async fn polar(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64_array(result.to_vec()) args.make_user_val_from_f64_array(result.to_vec())
} }
/// Convert from polar/sphere coordinates to cartesian coordinates. /// Convert polar/sphere (azimuth, elevation, distance) coordinates to
/// cartesian (x/y/z grid) coordinates.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')

View File

@ -105,7 +105,13 @@ pub async fn revolve(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::ExtrudeGroup(extrude_group)) Ok(MemoryItem::ExtrudeGroup(extrude_group))
} }
/// Revolve a sketch around an axis. /// Rotate a sketch around some provided axis, creating a solid from its extent.
///
/// This, like extrude, is able to create a 3-dimensional solid from a
/// 2-dimensional sketch. However, unlike extrude, this creates a solid
/// by using the extent of the sketch as its revolved around an axis rather
/// than using the extent of the sketch linearly translated through a third
/// dimension.
/// ///
/// ```no_run /// ```no_run
/// const part001 = startSketchOn('XY') /// const part001 = startSketchOn('XY')

View File

@ -18,7 +18,7 @@ pub async fn segment_end_x(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the segment end of x. /// Compute the ending point of the provided line segment along the 'x' axis.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -54,7 +54,7 @@ pub async fn segment_end_y(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the segment end of y. /// Compute the ending point of the provided line segment along the 'y' axis.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -91,14 +91,15 @@ pub async fn last_segment_x(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the last segment of x. /// Extract the 'x' axis value of the last line segment in the provided 2-d
/// sketch.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
/// |> startProfileAt([0, 0], %) /// |> startProfileAt([0, 0], %)
/// |> line([5, 0], %) /// |> line([5, 0], %)
/// |> line([20, 5], %) /// |> line([20, 5], %)
/// |> line([0, lastSegX(%)], %) /// |> line([lastSegX(%), 0], %)
/// |> line([-15, 0], %) /// |> line([-15, 0], %)
/// |> close(%) /// |> close(%)
/// ///
@ -133,7 +134,8 @@ pub async fn last_segment_y(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the last segment of y. /// Extract the 'y' axis value of the last line segment in the provided 2-d
/// sketch.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -174,7 +176,7 @@ pub async fn segment_length(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the length of the segment. /// Compute the length of the provided line segment.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -220,7 +222,7 @@ pub async fn segment_angle(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the angle of the segment. /// Compute the angle (in degrees) of the provided line segment.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -259,7 +261,7 @@ pub async fn angle_to_match_length_x(args: Args) -> Result<MemoryItem, KclError>
args.make_user_val_from_f64(result) args.make_user_val_from_f64(result)
} }
/// Returns the angle to match the given length for x. /// Compute the angle (in degrees) in o
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')

View File

@ -30,7 +30,8 @@ pub async fn circle(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(sketch_group)) Ok(MemoryItem::SketchGroup(sketch_group))
} }
/// Sketch a circle. /// Construct a 2-dimensional circle, of the specified radius, centered at
/// the provided (x, y) origin point.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("-XZ") /// const exampleSketch = startSketchOn("-XZ")

View File

@ -31,7 +31,9 @@ pub async fn shell(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::ExtrudeGroup(extrude_group)) Ok(MemoryItem::ExtrudeGroup(extrude_group))
} }
/// Shell a solid. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const firstSketch = startSketchOn('XY') /// const firstSketch = startSketchOn('XY')

View File

@ -97,7 +97,7 @@ pub async fn line_to(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw a line to a point. /// Draw a line from the current origin to some absolute (x, y) point.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -256,7 +256,8 @@ pub async fn line(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw a line. /// Draw a line relative to the current origin to a specified (x, y) away
/// from the current position.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XZ") /// const exampleSketch = startSketchOn("XZ")
@ -340,7 +341,8 @@ pub async fn x_line(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw a line parallel to the X-axis, with the given length. /// Draw a line relative to the current origin to a specified distance away
/// from the current position along the 'x' axis.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -382,7 +384,8 @@ pub async fn y_line(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw a line parallel to the Y-axis, with the given length. /// Draw a line relative to the current origin to a specified distance away
/// from the current position along the 'y' axis.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -435,7 +438,8 @@ pub async fn angled_line(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line. /// Draw a line segment relative to the current origin using the polar
/// measure of some angle and distance.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -523,7 +527,8 @@ pub async fn angled_line_of_x_length(args: Args) -> Result<MemoryItem, KclError>
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line of a given x length. /// Create a line segment from the current 2-dimensional sketch origin
/// along some angle (in degrees) for some relative length in the 'x' dimension.
/// ///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XZ') /// const sketch001 = startSketchOn('XZ')
@ -590,7 +595,9 @@ pub async fn angled_line_to_x(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line to a given x coordinate. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -646,7 +653,8 @@ pub async fn angled_line_of_y_length(args: Args) -> Result<MemoryItem, KclError>
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line of a given y length. /// Create a line segment from the current 2-dimensional sketch origin
/// along some angle (in degrees) for some relative length in the 'y' dimension.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -704,7 +712,9 @@ pub async fn angled_line_to_y(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line to a given y coordinate. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -772,7 +782,9 @@ pub async fn angled_line_that_intersects(args: Args) -> Result<MemoryItem, KclEr
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an angled line that intersects with a given line. /// Draw an angled line from the current origin, constructing a line segment
/// such that the newly created line intersects the desired target line
/// segment.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -826,7 +838,7 @@ pub async fn start_sketch_at(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(sketch_group)) Ok(MemoryItem::SketchGroup(sketch_group))
} }
/// Start a sketch at a given point on the 'XY' plane. /// Start a new 2-dimensional sketch at a given point on the 'XY' plane.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchAt([0, 0]) /// const exampleSketch = startSketchAt([0, 0])
@ -1003,7 +1015,7 @@ pub async fn start_sketch_on(args: Args) -> Result<MemoryItem, KclError> {
} }
} }
/// Start a sketch on a specific plane or face. /// Start a new 2-dimensional sketch on a specific plane or face.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn("XY") /// const exampleSketch = startSketchOn("XY")
@ -1186,7 +1198,7 @@ async fn start_sketch_on_plane(data: PlaneData, args: Args) -> Result<Box<Plane>
Ok(Box::new(plane)) Ok(Box::new(plane))
} }
/// Start a profile at a given point. /// Start a new profile at a given point.
pub async fn start_profile_at(args: Args) -> Result<MemoryItem, KclError> { pub async fn start_profile_at(args: Args) -> Result<MemoryItem, KclError> {
let (start, sketch_surface, tag): ([f64; 2], SketchSurface, Option<TagDeclarator>) = let (start, sketch_surface, tag): ([f64; 2], SketchSurface, Option<TagDeclarator>) =
args.get_data_and_sketch_surface()?; args.get_data_and_sketch_surface()?;
@ -1195,7 +1207,7 @@ pub async fn start_profile_at(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(sketch_group)) Ok(MemoryItem::SketchGroup(sketch_group))
} }
/// Start a profile at a given point. /// Start a new profile at a given point.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -1322,6 +1334,9 @@ pub async fn profile_start_x(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(x) args.make_user_val_from_f64(x)
} }
/// Extract the provided 2-dimensional sketch group's profile's origin's 'x'
/// value.
///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XY') /// const sketch001 = startSketchOn('XY')
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
@ -1343,6 +1358,9 @@ pub async fn profile_start_y(args: Args) -> Result<MemoryItem, KclError> {
args.make_user_val_from_f64(x) args.make_user_val_from_f64(x)
} }
/// Extract the provided 2-dimensional sketch group's profile's origin's 'y'
/// value.
///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XY') /// const sketch001 = startSketchOn('XY')
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
@ -1371,6 +1389,9 @@ pub async fn profile_start(args: Args) -> Result<MemoryItem, KclError> {
})) }))
} }
/// Extract the provided 2-dimensional sketch group's profile's origin
/// value.
///
/// ```no_run /// ```no_run
/// const sketch001 = startSketchOn('XY') /// const sketch001 = startSketchOn('XY')
/// |> startProfileAt([5, 2], %) /// |> startProfileAt([5, 2], %)
@ -1396,7 +1417,8 @@ pub async fn close(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Close the current sketch. /// Construct a line segment from the current origin back to the profile's
/// origin, ensuring the resulting 2-dimensional sketch is not open-ended.
/// ///
/// ```no_run /// ```no_run
/// startSketchOn('XZ') /// startSketchOn('XZ')
@ -1502,7 +1524,17 @@ pub async fn arc(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an arc. /// Starting at the current sketch's origin, draw a curved line segment along
/// an imaginary circle of the specified radius.
///
/// The arc is constructed such that the current position of the sketch is
/// placed along an imaginary circle of the specified radius, at angleStart
/// degrees. The resulting arc is the segment of the imaginary circle from
/// that origin point to angleEnd, radius away from the center of the imaginary
/// circle.
///
/// Unless this makes a lot of sense and feels like what you're looking
/// for to construct your shape, you're likely looking for tangentialArc.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -1615,7 +1647,13 @@ pub async fn tangential_arc(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an arc. /// Starting at the current sketch's origin, draw a curved line segment along
/// some part of an imaginary circle of the specified radius.
///
/// The arc is constructed such that the last line segment is placed tangent
/// to the imaginary circle of the specified radius. The resulting arc is the
/// segment of the imaginary circle from that tangent point for 'offset'
/// degrees along the imaginary circle.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -1743,7 +1781,9 @@ pub async fn tangential_arc_to(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw an arc. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -1832,7 +1872,9 @@ pub async fn bezier_curve(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Draw a bezier curve. /// 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.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XZ') /// const exampleSketch = startSketchOn('XZ')
@ -1921,7 +1963,7 @@ pub async fn hole(args: Args) -> Result<MemoryItem, KclError> {
Ok(MemoryItem::SketchGroup(new_sketch_group)) Ok(MemoryItem::SketchGroup(new_sketch_group))
} }
/// Use a sketch to cut a hole in another sketch. /// Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.
/// ///
/// ```no_run /// ```no_run
/// const exampleSketch = startSketchOn('XY') /// const exampleSketch = startSketchOn('XY')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 100 KiB