Compare commits

...

26 Commits

Author SHA1 Message Date
1e056cfd8a Display numeric units in the variables pane (#6683) 2025-05-06 03:40:18 +00:00
32db31e6c3 Increase cargo test retries (#6704) 2025-05-06 03:15:02 +00:00
9c246d6621 Fix units bug with involuteCircular (#6711)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-06 14:58:53 +12:00
9c52f5b19a Add tags to Rust std lib functions (#6701)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-06 14:14:11 +12:00
0464de33b1 Update the docs script (#6709)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-06 01:41:24 +00:00
1ed6bb8a7c change to no longer parallel for edges (#6705)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-05-06 01:06:20 +00:00
8f72920764 Fix app settings location not changing betwen nightly and release (#6656)
App settings location is not changing betwen nightly and release
Fixes #6655
2025-05-05 19:23:34 -04:00
574d6dae7f Add modules to docs (#6699)
* Support modules in docs

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

* shuffle around directories

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

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-06 11:02:55 +12:00
cf2e9d4b91 Add kclVersion as a field of the setting attribute (#6689)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-06 08:44:03 +12:00
7ab879a94f Show "experimental" badges around ML functionality (#6648)
* Make "experimental" a valid status for toolbar and commands

* Wire up status through createMachineCommand

* Add beaker icon

* Show UI elements if status is experimental

* Make ML operations experimental, powered by a flag

* Update command descriptions

* Add tooltip to home page Text-to-CAD button

* Splelnig erorrs

* 🧹lints

* Oopsie daisy Add KCL file isn't experimental

* Add warning message element to text area arg input

* Update message to common named constant
2025-05-05 15:36:22 +00:00
21da3c6482 allow var rename with tool equipped (#6693) 2025-05-05 08:13:13 -04:00
5f836358c0 Warn on usage of the unknown numeric suffix (#6690)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-05 13:17:55 +12:00
f407762259 Remove unused build scripts (#6673) 2025-05-03 12:07:54 -04:00
dea20861a0 Fix subtract2d icon in the Feature Tree (#6682) 2025-05-03 07:07:46 -04:00
bc818f10c3 Remove last remnants of legacy positional call (#6678)
* Remove last remnants of legacy positional call

* Update docs

* Fix segAng()

* Fix more docs

* Update docs again
2025-05-02 20:07:31 -05:00
19f5031ef7 Release KCL 66 (#6679)
Breaking changes:

 - All functions (even functions defined by users) must use keyword arguments, not positional arguments
2025-05-02 21:55:58 +00:00
b71eb4fb89 Simplify some test code (#6669) 2025-05-02 21:39:20 +00:00
c327c73087 Catch import scene selection on transforms and point to the feature tree (#6674)
* Catch import scene selection on transforms and point to the feature tree
Fixes #6667

* Add test for toast on clone, bringing back forgotten test
2025-05-02 17:25:33 -04:00
4fe8741ea7 Remove CallExpression support (#6639)
Users MUST use keyword call syntax now.

Closes https://github.com/KittyCAD/modeling-app/issues/4600
2025-05-02 16:08:12 -05:00
75916d4300 Fix resetting onboarding from settings in web after #6564 (#6675)
Fix resetting onboarding in web after #6564

Oversight on my part while refactoring the onboarding system in #6564.
The new centralized `acceptOnboarding` workflow constructs a relative
path, so we have to get out of the settings before invoking it.
2025-05-02 16:48:38 -04:00
e65a6b6a38 Remove reminder message in import (#6668)
Fixes #6666
2025-05-02 19:58:06 +00:00
86a83cadd3 Make onboarding optional, able to be ignored on desktop (take 2) (#6628)
* Remove unused `telemetryLoader`

* Remove onboarding redirect behavior

* Allow subRoute to be passed to navigateToProject

* Replace warning dialog routes with toasts

* Wire up new utilities and toasts to UI components

* Add home sidebar buttons for tutorial flow

* Rename menu item

* Add flex-1 so home-layout fills available space

* Remove onboarding avatar tests, they are becoming irrelevant

* Consolidate onboarding tests to one longer one

and update it to not use pixel color checks, and use fixtures.

* Shorten warning toast button text

* tsc, lint, and circular deps

* Update circular dep file

* Fix mistakes made in circular update tweaking

* One more dumb created circular dep

* Update src/routes/Onboarding/utils.tsx

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>

* Fix narrow screen home layout breaking

* fix: kevin, navigation routes fixed

* fix: filename parsing is correct now for onboarding with the last file sep

* Fix e2e test state checks that are diff on Linux

* Create onboarding project entirely through systemIOMachine

* Fix Windows path construction

* Make utility to verify a string is an onboarding value

* Little biome formatting suggestion fix

* Units onboarding step was not using OnboardingButtons

* Add type checking of next and previous status, fix useNextClick

* Thanks Graphite Diamond, I should use that new util

* Remove TODO comment

* Fix botched merge because IS_PLAYWRIGHT moved or something

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
2025-05-02 15:54:49 -04:00
00553c34ab Enable Boolean op deletion from the feature tree (#6637)
* Can't Delete Union From Feature Tree
Fixes #6584. Works locally but the new tests don't appear to work yet

* Change tests to right-click > Delete
2025-05-02 15:34:21 -04:00
ace9a59a45 fix cache and imports (#6647)
* updates

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

* fix clippy

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-05-02 17:41:14 +00:00
09ebb517d9 Fix link to types.md in docs (#6653)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-05-02 09:06:43 -07:00
1c697d30ee Fix to not add extra spaces when formatting call (#6652) 2025-05-02 08:16:07 -05:00
826 changed files with 74937 additions and 79856 deletions

View File

@ -1,3 +1,3 @@
[codespell]
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser,fromM,FromM
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,./e2e/playwright/lib/console-error-whitelist.ts,.package-lock.json,**/package-lock.json,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo,./src/lib/machine-api.d.ts
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/**/*.md,./e2e/playwright/lib/console-error-whitelist.ts,.package-lock.json,**/package-lock.json,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo,./src/lib/machine-api.d.ts

View File

@ -84,7 +84,7 @@ jobs:
run: |
set -euo pipefail
cd rust
cargo nextest run --workspace --features artifact-graph --retries=2 --no-fail-fast --profile ci simulation_tests::kcl_samples 2>&1 | tee /tmp/github-actions.log
cargo nextest run --workspace --features artifact-graph --retries=10 --no-fail-fast --profile ci simulation_tests::kcl_samples 2>&1 | tee /tmp/github-actions.log
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN_DEV}}
ZOO_HOST: https://api.dev.zoo.dev
@ -180,7 +180,7 @@ jobs:
ls -lah
cd rust
cargo nextest run\
--retries=2 --no-fail-fast -P ci --archive-file nextest-archive.tar.zst \
--retries=10 --no-fail-fast --profile ci --archive-file nextest-archive.tar.zst \
--partition count:${{ matrix.partitionIndex}}/${{ matrix.partitionTotal }} \
2>&1 | tee /tmp/github-actions.log
env:

View File

@ -38,17 +38,13 @@ jobs:
run: |
mkdir -p documentation/content/pages/docs/kcl/
# cleanup old
rm -rf documentation/content/pages/docs/kcl/*.md
rm -rf documentation/content/pages/docs/kcl/types
rm -rf documentation/content/pages/docs/kcl/functions
rm -rf documentation/content/pages/docs/kcl/consts
rm -rf documentation/content/pages/docs/kcl-std
rm -rf documentation/content/pages/docs/kcl-lang
# move new
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
mv -f docs/kcl/types documentation/content/pages/docs/kcl/
mv -f docs/kcl/functions documentation/content/pages/docs/kcl/
mv -f docs/kcl/consts documentation/content/pages/docs/kcl/
mv -f docs/kcl-std documentation/content/pages/docs
mv -f docs/kcl-lang documentation/content/pages/docs
# We don't need the README
rm documentation/content/pages/docs/kcl/README.md
rm documentation/content/pages/docs/kcl-std/README.md
- name: move kcl-samples
shell: bash
run: |

View File

@ -97,7 +97,7 @@ The following will need to be run when checking out a new commit and guarantees
```bash
npm install
npm run build:wasm
npm start # or npm run build:local && npm run serve for slower but more production-like build
npm start
```
## Before submitting a PR

View File

@ -49,14 +49,9 @@ REACT_SOURCES := $(wildcard src/*.tsx) $(wildcard src/**/*.tsx)
TYPESCRIPT_SOURCES := tsconfig.* $(wildcard src/*.ts) $(wildcard src/**/*.ts)
VITE_SOURCES := $(wildcard vite.*) $(wildcard vite/**/*.tsx)
.PHONY: build
build: build-web build-desktop
.PHONY: build-web
build-web: install public/kcl_wasm_lib_bg.wasm build/index.html
.PHONY: build-desktop
build-desktop: install public/kcl_wasm_lib_bg.wasm .vite/build/main.js
build: install public/kcl_wasm_lib_bg.wasm .vite/build/main.js
public/kcl_wasm_lib_bg.wasm: $(CARGO_SOURCES) $(RUST_SOURCES)
ifdef WINDOWS
@ -65,9 +60,6 @@ else
npm run build:wasm:dev
endif
build/index.html: $(REACT_SOURCES) $(TYPESCRIPT_SOURCES) $(VITE_SOURCES)
npm run build:local
.vite/build/main.js: $(REACT_SOURCES) $(TYPESCRIPT_SOURCES) $(VITE_SOURCES)
npm run tronb:vite:dev
@ -95,11 +87,11 @@ TARGET ?= desktop
run: run-$(TARGET)
.PHONY: run-web
run-web: install build-web ## Start the web app
run-web: install build ## Start the web app
npm run start
.PHONY: run-desktop
run-desktop: install build-desktop ## Start the desktop app
run-desktop: install build ## Start the desktop app
npm run tron:start
###############################################################################
@ -121,7 +113,7 @@ test-unit: install ## Run the unit tests
test-e2e: test-e2e-$(TARGET)
.PHONY: test-e2e-web
test-e2e-web: install build-web ## Run the web e2e tests
test-e2e-web: install build ## Run the web e2e tests
@ curl -fs localhost:3000 >/dev/null || ( echo "Error: localhost:3000 not available, 'make run-web' first" && exit 1 )
ifdef E2E_GREP
npm run chrome:test -- --headed --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
@ -130,7 +122,7 @@ else
endif
.PHONY: test-e2e-desktop
test-e2e-desktop: install build-desktop ## Run the desktop e2e tests
test-e2e-desktop: install build ## Run the desktop e2e tests
ifdef E2E_GREP
npm run test:playwright:electron -- --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
else

12
docs/kcl-lang/index.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "KCL Language Guide"
excerpt: "Documentation of the KCL language for the Zoo Design Studio."
layout: manual
---
## Topics
* [`Types`](/docs/kcl-lang/types)
* [`Modules`](/docs/kcl-lang/modules)
* [`Settings`](/docs/kcl-lang/settings)
* [`Known Issues`](/docs/kcl-lang/known-issues)

View File

@ -210,7 +210,7 @@ As per the example above you can use the tag identifier to get a reference to th
tagged object. The syntax for this is `myTag`.
In the example above we use the tag identifier to get the angle of the segment
`segAng(rectangleSegmentA001, %)`.
`segAng(rectangleSegmentA001)`.
### `Start`

View File

@ -21,23 +21,22 @@ angledLine(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `length` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthX` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthY` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteX` | [`number`](/docs/kcl/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteY` | [`number`](/docs/kcl/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `length` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthX` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthY` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteX` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteY` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -18,20 +18,19 @@ angledLineThatIntersects(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `intersectTag` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the line to intersect with | Yes |
| `offset` | [`number`](/docs/kcl/types/std-types-number) | The offset from the intersecting line. Defaults to 0. | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `intersectTag` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the line to intersect with | Yes |
| `offset` | [`number`](/docs/kcl-std/types/std-types-number) | The offset from the intersecting line. Defaults to 0. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -17,19 +17,18 @@ appearance(
): [Solid] | ImportedGeometry
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The solid(s) whose appearance is being set | Yes |
| `color` | [`string`](/docs/kcl/types/std-types-string) | Color of the new material, a hex string like '#ff0000' | Yes |
| `metalness` | [`number`](/docs/kcl/types/std-types-number) | Metalness of the new material, a percentage like 95.7. | No |
| `roughness` | [`number`](/docs/kcl/types/std-types-number) | Roughness of the new material, a percentage like 95.7. | No |
| `solids` | [`[Solid]`](/docs/kcl-std/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) | The solid(s) whose appearance is being set | Yes |
| `color` | [`string`](/docs/kcl-std/types/std-types-string) | Color of the new material, a hex string like '#ff0000' | Yes |
| `metalness` | [`number`](/docs/kcl-std/types/std-types-number) | Metalness of the new material, a percentage like 95.7. | No |
| `roughness` | [`number`](/docs/kcl-std/types/std-types-number) | Roughness of the new material, a percentage like 95.7. | No |
### Returns
[`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - Data for a solid or an imported geometry.
[`[Solid]`](/docs/kcl-std/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) - Data for a solid or an imported geometry.
### Examples

View File

@ -22,22 +22,21 @@ arc(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angleStart` | [`number`](/docs/kcl/types/std-types-number) | Where along the circle should this arc start? | No |
| `angleEnd` | [`number`](/docs/kcl/types/std-types-number) | Where along the circle should this arc end? | No |
| `radius` | [`number`](/docs/kcl/types/std-types-number) | How large should the circle be? | No |
| `interiorAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
| `endAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angleStart` | [`number`](/docs/kcl-std/types/std-types-number) | Where along the circle should this arc start? | No |
| `angleEnd` | [`number`](/docs/kcl-std/types/std-types-number) | Where along the circle should this arc end? | No |
| `radius` | [`number`](/docs/kcl-std/types/std-types-number) | How large should the circle be? | No |
| `interiorAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
| `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -21,19 +21,18 @@ assert(
): ()
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `actual` | [`number`](/docs/kcl/types/std-types-number) | Value to check. It will be compared with one of the comparison arguments. | Yes |
| `isGreaterThan` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than this. | No |
| `isLessThan` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than this. | No |
| `isGreaterThanOrEqual` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than or equal to this. | No |
| `isLessThanOrEqual` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
| `isEqualTo` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | If `isEqualTo` is used, this is the tolerance to allow for the comparison. This tolerance is used because KCL's number system has some floating-point imprecision when used with very large decimal places. | No |
| `error` | [`string`](/docs/kcl/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
| `actual` | [`number`](/docs/kcl-std/types/std-types-number) | Value to check. It will be compared with one of the comparison arguments. | Yes |
| `isGreaterThan` | [`number`](/docs/kcl-std/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than this. | No |
| `isLessThan` | [`number`](/docs/kcl-std/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than this. | No |
| `isGreaterThanOrEqual` | [`number`](/docs/kcl-std/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than or equal to this. | No |
| `isLessThanOrEqual` | [`number`](/docs/kcl-std/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
| `isEqualTo` | [`number`](/docs/kcl-std/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
| `tolerance` | [`number`](/docs/kcl-std/types/std-types-number) | If `isEqualTo` is used, this is the tolerance to allow for the comparison. This tolerance is used because KCL's number system has some floating-point imprecision when used with very large decimal places. | No |
| `error` | [`string`](/docs/kcl-std/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
### Returns

View File

@ -15,13 +15,12 @@ assertIs(
): ()
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `actual` | [`bool`](/docs/kcl/types/std-types-bool) | Value to check. If this is the boolean value true, assert passes. Otherwise it fails. | Yes |
| `error` | [`string`](/docs/kcl/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
| `actual` | [`bool`](/docs/kcl-std/types/std-types-bool) | Value to check. If this is the boolean value true, assert passes. Otherwise it fails. | Yes |
| `error` | [`string`](/docs/kcl-std/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
### Returns

View File

@ -18,20 +18,19 @@ bezierCurve(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `control1` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | First control point for the cubic | Yes |
| `control2` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Second control point for the cubic | Yes |
| `end` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? | Yes |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `control1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | First control point for the cubic | Yes |
| `control2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Second control point for the cubic | Yes |
| `end` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -18,20 +18,19 @@ circleThreePoint(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`Plane`](/docs/kcl/types/std-types-Plane) or [`Face`](/docs/kcl/types/std-types-Face) | Plane or surface to sketch on. | Yes |
| `p1` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 1st point to derive the circle. | Yes |
| `p2` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 2nd point to derive the circle. | Yes |
| `p3` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 3rd point to derive the circle. | Yes |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Identifier for the circle to reference elsewhere. | No |
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | Plane or surface to sketch on. | Yes |
| `p1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 1st point to derive the circle. | Yes |
| `p2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 2nd point to derive the circle. | Yes |
| `p3` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 3rd point to derive the circle. | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Identifier for the circle to reference elsewhere. | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -16,16 +16,15 @@ Really only use this function if YOU ARE SURE you need it. In most cases you do
clone(geometry: Solid | Sketch | ImportedGeometry): Solid | Sketch | ImportedGeometry
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `geometry` | [`Solid`](/docs/kcl/types/std-types-Solid) or [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The sketch, solid, or imported geometry to be cloned | Yes |
| `geometry` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) | The sketch, solid, or imported geometry to be cloned | Yes |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid) or [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - A geometry including an imported geometry.
[`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) - A geometry including an imported geometry.
### Examples

View File

@ -15,17 +15,16 @@ close(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch you want to close | Yes |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch you want to close | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -19,21 +19,20 @@ extrude(
): [Solid]
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketch or sketches should be extruded | Yes |
| `length` | [`number`](/docs/kcl/types/std-types-number) | How far to extrude the given sketches | Yes |
| `symmetric` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the | No |
| `bidirectionalLength` | [`number`](/docs/kcl/types/std-types-number) | If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored. | No |
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the start of the extrusion, i.e. the original sketch | No |
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch | No |
| `sketches` | [`[Sketch]`](/docs/kcl-std/types/std-types-Sketch) | Which sketch or sketches should be extruded | Yes |
| `length` | [`number`](/docs/kcl-std/types/std-types-number) | How far to extrude the given sketches | Yes |
| `symmetric` | [`bool`](/docs/kcl-std/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the | No |
| `bidirectionalLength` | [`number`](/docs/kcl-std/types/std-types-number) | If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored. | No |
| `tagStart` | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | A named tag for the face at the start of the extrusion, i.e. the original sketch | No |
| `tagEnd` | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch | No |
### Returns
[`[Solid]`](/docs/kcl/types/std-types-Solid)
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -20,22 +20,21 @@ helix(
): Helix
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `revolutions` | `number(_)` | Number of revolutions. | Yes |
| `angleStart` | `number(Angle)` | Start angle. | Yes |
| `ccw` | [`bool`](/docs/kcl/types/std-types-bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
| `ccw` | [`bool`](/docs/kcl-std/types/std-types-bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
| `radius` | `number(Length)` | Radius of the helix. | No |
| `axis` | [`Axis3d`](/docs/kcl/types/std-types-Axis3d) or [`Edge`](/docs/kcl/types/std-types-Edge) | Axis to use for the helix. | No |
| `axis` | [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | Axis to use for the helix. | No |
| `length` | `number(Length)` | Length of the helix. This is not necessary if the helix is created around an edge. If not given the length of the edge is used. | No |
| `cylinder` | [`Solid`](/docs/kcl/types/std-types-Solid) | Cylinder to create the helix on. | No |
| `cylinder` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | Cylinder to create the helix on. | No |
### Returns
[`Helix`](/docs/kcl/types/std-types-Helix)
[`Helix`](/docs/kcl-std/types/std-types-Helix)
### Examples

View File

@ -12,16 +12,15 @@ Compute the absolute value of a number.
abs(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,7 +12,6 @@ Compute the arccosine of a number.
acos(@num: number(_)): number(rad)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Compute the arcsine of a number.
asin(@num: number(_)): number(rad)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Consider using `atan2()` instead for the true inverse of tangent.
atan(@num: number(_)): number(rad)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -15,7 +15,6 @@ atan2(
): number(rad)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,16 +12,15 @@ Compute the smallest integer greater than or equal to a number.
ceil(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,7 +12,6 @@ Compute the cosine of a number.
cos(@num: number(Angle)): number(_)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,16 +12,15 @@ Compute the largest integer less than or equal to a number.
floor(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Compute the natural logarithm of the number.
ln(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -17,17 +17,16 @@ log(
): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to compute the logarithm of. | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | The number to compute the logarithm of. | Yes |
| `base` | `number(_)` | The base of the logarithm. | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Compute the base 10 logarithm of the number.
log10(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Compute the base 2 logarithm of the number.
log2(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Compute the maximum of the given arguments.
max(@input: [number; 1+]): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the maximum of. | Yes |
| `input` | [`[number; 1+]`](/docs/kcl-std/types/std-types-number) | An array of numbers to compute the maximum of. | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Compute the minimum of the given arguments.
min(@input: [number; 1+]): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the minimum of. | Yes |
| `input` | [`[number; 1+]`](/docs/kcl-std/types/std-types-number) | An array of numbers to compute the minimum of. | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -16,7 +16,6 @@ polar(
): Point2d
```
### Arguments
| Name | Type | Description | Required |
@ -26,7 +25,7 @@ polar(
### Returns
[`Point2d`](/docs/kcl/types/std-types-Point2d)
[`Point2d`](/docs/kcl-std/types/std-types-Point2d)
### Examples

View File

@ -15,17 +15,16 @@ pow(
): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to raise. | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | The number to raise. | Yes |
| `exp` | `number(_)` | The power to raise to. | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -16,17 +16,16 @@ rem(
): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `num` | [`number`](/docs/kcl/types/std-types-number) | The number which will be divided by `divisor`. | Yes |
| `divisor` | [`number`](/docs/kcl/types/std-types-number) | The number which will divide `num`. | Yes |
| `num` | [`number`](/docs/kcl-std/types/std-types-number) | The number which will be divided by `divisor`. | Yes |
| `divisor` | [`number`](/docs/kcl-std/types/std-types-number) | The number which will divide `num`. | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Round a number to the nearest integer.
round(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,7 +12,6 @@ Compute the sine of a number.
sin(@num: number(Angle)): number(_)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,16 +12,15 @@ Compute the square root of a number.
sqrt(@input: number): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,7 +12,6 @@ Compute the tangent of a number.
tan(@num: number(Angle)): number(_)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -16,17 +16,16 @@ offsetPlane(
): Plane
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `plane` | [`Plane`](/docs/kcl/types/std-types-Plane) | The plane (e.g. `XY`) which this new plane is created from. | Yes |
| `plane` | [`Plane`](/docs/kcl-std/types/std-types-Plane) | The plane (e.g. `XY`) which this new plane is created from. | Yes |
| `offset` | `number(Length)` | Distance from the standard plane this new plane will be created at. | Yes |
### Returns
[`Plane`](/docs/kcl/types/std-types-Plane)
[`Plane`](/docs/kcl-std/types/std-types-Plane)
### Examples

View File

@ -30,23 +30,22 @@ revolve(
): Solid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes |
| `axis` | [`Axis2d`](/docs/kcl/types/std-types-Axis2d) or [`Edge`](/docs/kcl/types/std-types-Edge) | Axis of revolution. | Yes |
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes |
| `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | Axis of revolution. | Yes |
| `angle` | `number(Angle)` | Angle to revolve (in degrees). Default is 360. | No |
| `tolerance` | `number(Length)` | Tolerance for the revolve operation. | No |
| `symmetric` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
| `symmetric` | [`bool`](/docs/kcl-std/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
| `bidirectionalAngle` | `number(Angle)` | If specified, will also revolve in the opposite direction to 'angle' to the specified angle. If 'symmetric' is true, this value is ignored. | No |
| `tagStart` | [`tag`](/docs/kcl/types/std-types-tag) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
| `tagEnd` | [`tag`](/docs/kcl/types/std-types-tag) | A named tag for the face at the end of the revolve. | No |
| `tagStart` | [`tag`](/docs/kcl-std/types/std-types-tag) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
| `tagEnd` | [`tag`](/docs/kcl-std/types/std-types-tag) | A named tag for the face at the end of the revolve. | No |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid)
[`Solid`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -18,19 +18,18 @@ circle(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch_or_surface` | [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`Plane`](/docs/kcl/types/std-types-Plane) or [`Face`](/docs/kcl/types/std-types-Face) | Sketch to extend, or plane or surface to sketch on. | Yes |
| `center` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | The center of the circle. | Yes |
| `sketch_or_surface` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | Sketch to extend, or plane or surface to sketch on. | Yes |
| `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center of the circle. | Yes |
| `radius` | `number(Length)` | The radius of the circle. | Yes |
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this circle. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this circle. | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -17,17 +17,16 @@ mirror2d(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or sketches to be reflected. | Yes |
| `axis` | [`Axis2d`](/docs/kcl/types/std-types-Axis2d) or [`Edge`](/docs/kcl/types/std-types-Edge) | The axis to reflect around. | Yes |
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch) | The sketch or sketches to be reflected. | Yes |
| `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | The axis to reflect around. | Yes |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -19,19 +19,18 @@ chamfer(
): Solid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be chamfered | Yes |
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be chamfered | Yes |
| `length` | `number(Length)` | The length of the chamfer | Yes |
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to chamfer | Yes |
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this chamfer | No |
| `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to chamfer | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this chamfer | No |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid)
[`Solid`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -20,20 +20,19 @@ fillet(
): Solid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
| `radius` | `number(Length)` | The radius of the fillet | Yes |
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to fillet | Yes |
| `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to fillet | Yes |
| `tolerance` | `number(Length)` | The tolerance for this fillet | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this fillet | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this fillet | No |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid)
[`Solid`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -16,17 +16,16 @@ hollow(
): Solid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | Which solid to hollow out | Yes |
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | Which solid to hollow out | Yes |
| `thickness` | `number(Length)` | The thickness of the remaining shell | Yes |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid)
[`Solid`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -17,18 +17,17 @@ shell(
): [Solid]
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solids` | [`[Solid; 1+]`](/docs/kcl/types/std-types-Solid) | Which solid (or solids) to shell out | Yes |
| `solids` | [`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid) | Which solid (or solids) to shell out | Yes |
| `thickness` | `number(Length)` | The thickness of the shell | Yes |
| `faces` | [`[tag; 1+]`](/docs/kcl/types/std-types-tag) | The faces you want removed | Yes |
| `faces` | [`[tag; 1+]`](/docs/kcl-std/types/std-types-tag) | The faces you want removed | Yes |
### Returns
[`[Solid]`](/docs/kcl/types/std-types-Solid)
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -12,7 +12,6 @@ Convert a number to centimeters from its current units.
units::toCentimeters(@num: number(cm)): number(cm)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Converts a number to degrees from its current units.
units::toDegrees(@num: number(deg)): number(deg)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Convert a number to feet from its current units.
units::toFeet(@num: number(ft)): number(ft)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Convert a number to inches from its current units.
units::toInches(@num: number(in)): number(in)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Convert a number to meters from its current units.
units::toMeters(@num: number(m)): number(m)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Convert a number to millimeters from its current units.
units::toMillimeters(@num: number(mm)): number(mm)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Converts a number to radians from its current units.
units::toRadians(@num: number(rad)): number(rad)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,7 +12,6 @@ Converts a number to yards from its current units.
units::toYards(@num: number(yd)): number(yd)
```
### Arguments
| Name | Type | Description | Required |

View File

@ -12,12 +12,11 @@ Get the shared edge between two faces.
getCommonEdge(faces: [TagIdentifier]): Uuid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `faces` | [`[TagIdentifier]`](/docs/kcl/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
| `faces` | [`[TagIdentifier]`](/docs/kcl-lang/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
### Returns

View File

@ -12,12 +12,11 @@ Get the next adjacent edge to the edge given.
getNextAdjacentEdge(edge: TagIdentifier): Uuid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
### Returns

View File

@ -12,12 +12,11 @@ Get the opposite edge to the edge given.
getOppositeEdge(edge: TagIdentifier): Uuid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the opposite edge of. | Yes |
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the opposite edge of. | Yes |
### Returns

View File

@ -12,12 +12,11 @@ Get the previous adjacent edge to the edge given.
getPreviousAdjacentEdge(edge: TagIdentifier): Uuid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
### Returns

160
docs/kcl-std/index.md Normal file
View File

@ -0,0 +1,160 @@
---
title: "KCL Standard Library"
excerpt: "Documentation for the KCL standard library for the Zoo Design Studio."
layout: manual
---
## Table of Contents
### Functions
* [**std**](/docs/kcl-std/modules/std)
* [`angledLine`](/docs/kcl-std/angledLine)
* [`angledLineThatIntersects`](/docs/kcl-std/angledLineThatIntersects)
* [`appearance`](/docs/kcl-std/appearance)
* [`arc`](/docs/kcl-std/arc)
* [`assert`](/docs/kcl-std/assert)
* [`assertIs`](/docs/kcl-std/assertIs)
* [`bezierCurve`](/docs/kcl-std/bezierCurve)
* [`circleThreePoint`](/docs/kcl-std/circleThreePoint)
* [`clone`](/docs/kcl-std/clone)
* [`close`](/docs/kcl-std/close)
* [`extrude`](/docs/kcl-std/extrude)
* [`getCommonEdge`](/docs/kcl-std/getCommonEdge)
* [`getNextAdjacentEdge`](/docs/kcl-std/getNextAdjacentEdge)
* [`getOppositeEdge`](/docs/kcl-std/getOppositeEdge)
* [`getPreviousAdjacentEdge`](/docs/kcl-std/getPreviousAdjacentEdge)
* [`helix`](/docs/kcl-std/functions/std-helix)
* [`intersect`](/docs/kcl-std/intersect)
* [`involuteCircular`](/docs/kcl-std/involuteCircular)
* [`lastSegX`](/docs/kcl-std/lastSegX)
* [`lastSegY`](/docs/kcl-std/lastSegY)
* [`legAngX`](/docs/kcl-std/legAngX)
* [`legAngY`](/docs/kcl-std/legAngY)
* [`legLen`](/docs/kcl-std/legLen)
* [`line`](/docs/kcl-std/line)
* [`loft`](/docs/kcl-std/loft)
* [`map`](/docs/kcl-std/map)
* [`offsetPlane`](/docs/kcl-std/functions/std-offsetPlane)
* [`patternCircular2d`](/docs/kcl-std/patternCircular2d)
* [`patternCircular3d`](/docs/kcl-std/patternCircular3d)
* [`patternLinear2d`](/docs/kcl-std/patternLinear2d)
* [`patternLinear3d`](/docs/kcl-std/patternLinear3d)
* [`patternTransform`](/docs/kcl-std/patternTransform)
* [`patternTransform2d`](/docs/kcl-std/patternTransform2d)
* [`polygon`](/docs/kcl-std/polygon)
* [`pop`](/docs/kcl-std/pop)
* [`profileStart`](/docs/kcl-std/profileStart)
* [`profileStartX`](/docs/kcl-std/profileStartX)
* [`profileStartY`](/docs/kcl-std/profileStartY)
* [`push`](/docs/kcl-std/push)
* [`reduce`](/docs/kcl-std/reduce)
* [`revolve`](/docs/kcl-std/functions/std-revolve)
* [`rotate`](/docs/kcl-std/rotate)
* [`scale`](/docs/kcl-std/scale)
* [`segAng`](/docs/kcl-std/segAng)
* [`segEnd`](/docs/kcl-std/segEnd)
* [`segEndX`](/docs/kcl-std/segEndX)
* [`segEndY`](/docs/kcl-std/segEndY)
* [`segLen`](/docs/kcl-std/segLen)
* [`segStart`](/docs/kcl-std/segStart)
* [`segStartX`](/docs/kcl-std/segStartX)
* [`segStartY`](/docs/kcl-std/segStartY)
* [`startProfile`](/docs/kcl-std/startProfile)
* [`startSketchOn`](/docs/kcl-std/startSketchOn)
* [`subtract`](/docs/kcl-std/subtract)
* [`subtract2d`](/docs/kcl-std/subtract2d)
* [`sweep`](/docs/kcl-std/sweep)
* [`tangentToEnd`](/docs/kcl-std/tangentToEnd)
* [`tangentialArc`](/docs/kcl-std/tangentialArc)
* [`translate`](/docs/kcl-std/translate)
* [`union`](/docs/kcl-std/union)
* [`xLine`](/docs/kcl-std/xLine)
* [`yLine`](/docs/kcl-std/yLine)
* [**std::math**](/docs/kcl-std/modules/std-math)
* [`abs`](/docs/kcl-std/functions/std-math-abs)
* [`acos`](/docs/kcl-std/functions/std-math-acos)
* [`asin`](/docs/kcl-std/functions/std-math-asin)
* [`atan`](/docs/kcl-std/functions/std-math-atan)
* [`atan2`](/docs/kcl-std/functions/std-math-atan2)
* [`ceil`](/docs/kcl-std/functions/std-math-ceil)
* [`cos`](/docs/kcl-std/functions/std-math-cos)
* [`floor`](/docs/kcl-std/functions/std-math-floor)
* [`ln`](/docs/kcl-std/functions/std-math-ln)
* [`log`](/docs/kcl-std/functions/std-math-log)
* [`log10`](/docs/kcl-std/functions/std-math-log10)
* [`log2`](/docs/kcl-std/functions/std-math-log2)
* [`max`](/docs/kcl-std/functions/std-math-max)
* [`min`](/docs/kcl-std/functions/std-math-min)
* [`polar`](/docs/kcl-std/functions/std-math-polar)
* [`pow`](/docs/kcl-std/functions/std-math-pow)
* [`rem`](/docs/kcl-std/functions/std-math-rem)
* [`round`](/docs/kcl-std/functions/std-math-round)
* [`sin`](/docs/kcl-std/functions/std-math-sin)
* [`sqrt`](/docs/kcl-std/functions/std-math-sqrt)
* [`tan`](/docs/kcl-std/functions/std-math-tan)
* [**std::sketch**](/docs/kcl-std/modules/std-sketch)
* [`circle`](/docs/kcl-std/functions/std-sketch-circle)
* [`mirror2d`](/docs/kcl-std/functions/std-sketch-mirror2d)
* [**std::solid**](/docs/kcl-std/modules/std-solid)
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)
* [`shell`](/docs/kcl-std/functions/std-solid-shell)
* [**std::units**](/docs/kcl-std/modules/std-units)
* [`units::toCentimeters`](/docs/kcl-std/functions/std-units-toCentimeters)
* [`units::toDegrees`](/docs/kcl-std/functions/std-units-toDegrees)
* [`units::toFeet`](/docs/kcl-std/functions/std-units-toFeet)
* [`units::toInches`](/docs/kcl-std/functions/std-units-toInches)
* [`units::toMeters`](/docs/kcl-std/functions/std-units-toMeters)
* [`units::toMillimeters`](/docs/kcl-std/functions/std-units-toMillimeters)
* [`units::toRadians`](/docs/kcl-std/functions/std-units-toRadians)
* [`units::toYards`](/docs/kcl-std/functions/std-units-toYards)
### Constants
* [**std**](/docs/kcl-std/modules/std)
* [`END`](/docs/kcl-std/consts/std-END)
* [`START`](/docs/kcl-std/consts/std-START)
* [`X`](/docs/kcl-std/consts/std-X)
* [`XY`](/docs/kcl-std/consts/std-XY)
* [`XZ`](/docs/kcl-std/consts/std-XZ)
* [`Y`](/docs/kcl-std/consts/std-Y)
* [`YZ`](/docs/kcl-std/consts/std-YZ)
* [`Z`](/docs/kcl-std/consts/std-Z)
* [**std::math**](/docs/kcl-std/modules/std-math)
* [`E`](/docs/kcl-std/consts/std-math-E)
* [`PI`](/docs/kcl-std/consts/std-math-PI)
* [`TAU`](/docs/kcl-std/consts/std-math-TAU)
* [**std::turns**](/docs/kcl-std/modules/std-turns)
* [`turns::HALF_TURN`](/docs/kcl-std/consts/std-turns-HALF_TURN)
* [`turns::QUARTER_TURN`](/docs/kcl-std/consts/std-turns-QUARTER_TURN)
* [`turns::THREE_QUARTER_TURN`](/docs/kcl-std/consts/std-turns-THREE_QUARTER_TURN)
* [`turns::ZERO`](/docs/kcl-std/consts/std-turns-ZERO)
### Types
See also the [types overview](/docs/kcl-lang/types)
* [**Primitive types**](/docs/kcl-std/modules/Primitive types)
* [`End`](/docs/kcl-std/types#End)
* [`ImportedGeometry`](/docs/kcl-std/types#ImportedGeometry)
* [`Start`](/docs/kcl-std/types#Start)
* [`TagDeclarator`](/docs/kcl-std/types#TagDeclarator)
* [`TagIdentifier`](/docs/kcl-std/types#TagIdentifier)
* [`any`](/docs/kcl-std/types/std-types-any)
* [`bool`](/docs/kcl-std/types/std-types-bool)
* [`number`](/docs/kcl-std/types/std-types-number)
* [`string`](/docs/kcl-std/types/std-types-string)
* [`tag`](/docs/kcl-std/types/std-types-tag)
* [**std::types**](/docs/kcl-std/modules/std-types)
* [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d)
* [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d)
* [`Edge`](/docs/kcl-std/types/std-types-Edge)
* [`Face`](/docs/kcl-std/types/std-types-Face)
* [`Helix`](/docs/kcl-std/types/std-types-Helix)
* [`Plane`](/docs/kcl-std/types/std-types-Plane)
* [`Point2d`](/docs/kcl-std/types/std-types-Point2d)
* [`Point3d`](/docs/kcl-std/types/std-types-Point3d)
* [`Sketch`](/docs/kcl-std/types/std-types-Sketch)
* [`Solid`](/docs/kcl-std/types/std-types-Solid)

View File

@ -15,17 +15,16 @@ intersect(
): [Solid]
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | The solids to intersect. | Yes |
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | The tolerance to use for the intersection operation. | No |
| `solids` | [`[Solid]`](/docs/kcl-std/types/std-types-Solid) | The solids to intersect. | Yes |
| `tolerance` | [`number`](/docs/kcl-std/types/std-types-number) | The tolerance to use for the intersection operation. | No |
### Returns
[`[Solid]`](/docs/kcl/types/std-types-Solid)
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -19,21 +19,20 @@ involuteCircular(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `startRadius` | [`number`](/docs/kcl/types/std-types-number) | The involute is described between two circles, start_radius is the radius of the inner circle. | Yes |
| `endRadius` | [`number`](/docs/kcl/types/std-types-number) | The involute is described between two circles, end_radius is the radius of the outer circle. | Yes |
| `angle` | [`number`](/docs/kcl/types/std-types-number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes |
| `reverse` | [`bool`](/docs/kcl/types/std-types-bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. Defaults to false. | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `startRadius` | [`number`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, start_radius is the radius of the inner circle. | Yes |
| `endRadius` | [`number`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, end_radius is the radius of the outer circle. | Yes |
| `angle` | [`number`](/docs/kcl-std/types/std-types-number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes |
| `reverse` | [`bool`](/docs/kcl-std/types/std-types-bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. Defaults to false. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -12,16 +12,15 @@ Extract the 'x' axis value of the last line segment in the provided 2-d sketch.
lastSegX(sketch: Sketch): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -12,16 +12,15 @@ Extract the 'y' axis value of the last line segment in the provided 2-d sketch.
lastSegY(sketch: Sketch): number
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples

View File

@ -15,21 +15,16 @@ legAngX(
): number
```
### Tags
* `utilities`
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
| `hypotenuse` | [`number`](/docs/kcl-std/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples
@ -39,3 +34,4 @@ legAngX(hypotenuse = 5, leg = 3)
```

View File

@ -15,21 +15,16 @@ legAngY(
): number
```
### Tags
* `utilities`
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
| `hypotenuse` | [`number`](/docs/kcl-std/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples
@ -39,3 +34,4 @@ legAngY(hypotenuse = 5, leg = 3)
```

View File

@ -15,21 +15,16 @@ legLen(
): number
```
### Tags
* `utilities`
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
| `hypotenuse` | [`number`](/docs/kcl-std/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
### Returns
[`number`](/docs/kcl/types/std-types-number)
[`number`](/docs/kcl-std/types/std-types-number)
### Examples
@ -39,3 +34,4 @@ legLen(hypotenuse = 5, leg = 3)
```

View File

@ -17,19 +17,18 @@ line(
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `endAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Which absolute point should this line go to? Incompatible with `end`. | No |
| `end` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No |
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Which absolute point should this line go to? Incompatible with `end`. | No |
| `end` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/std-types-Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
### Examples

View File

@ -20,22 +20,21 @@ loft(
): Solid
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
| `vDegree` | [`number`](/docs/kcl/types/std-types-number) | Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | Yes |
| `bezApproximateRational` | [`bool`](/docs/kcl/types/std-types-bool) | Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary. | Yes |
| `baseCurveIndex` | [`number`](/docs/kcl/types/std-types-number) | This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | Tolerance for the loft operation. | No |
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the start of the loft, i.e. the original sketch | No |
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the end of the loft, i.e. the last sketch | No |
| `sketches` | [`[Sketch]`](/docs/kcl-std/types/std-types-Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
| `vDegree` | [`number`](/docs/kcl-std/types/std-types-number) | Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | Yes |
| `bezApproximateRational` | [`bool`](/docs/kcl-std/types/std-types-bool) | Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary. | Yes |
| `baseCurveIndex` | [`number`](/docs/kcl-std/types/std-types-number) | This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
| `tolerance` | [`number`](/docs/kcl-std/types/std-types-number) | Tolerance for the loft operation. | No |
| `tagStart` | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | A named tag for the face at the start of the loft, i.e. the original sketch | No |
| `tagEnd` | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | A named tag for the face at the end of the loft, i.e. the last sketch | No |
### Returns
[`Solid`](/docs/kcl/types/std-types-Solid)
[`Solid`](/docs/kcl-std/types/std-types-Solid)
### Examples

View File

@ -15,17 +15,16 @@ map(
): [any]
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `array` | [`[any]`](/docs/kcl/types/std-types-any) | Input array. The output array is this input array, but every element has had the function `f` run on it. | Yes |
| `array` | [`[any]`](/docs/kcl-std/types/std-types-any) | Input array. The output array is this input array, but every element has had the function `f` run on it. | Yes |
| `f` | `FunctionSource` | A function. The output array is just the input array, but `f` has been run on every item. | Yes |
### Returns
[`[any]`](/docs/kcl/types/std-types-any)
[`[any]`](/docs/kcl-std/types/std-types-any)
### Examples

View File

@ -0,0 +1,38 @@
---
title: "std::math"
excerpt: ""
layout: manual
---
## Functions and constants
* [`E`](/docs/kcl-std/consts/std-math-E)
* [`PI`](/docs/kcl-std/consts/std-math-PI)
* [`TAU`](/docs/kcl-std/consts/std-math-TAU)
* [`abs`](/docs/kcl-std/functions/std-math-abs)
* [`acos`](/docs/kcl-std/functions/std-math-acos)
* [`asin`](/docs/kcl-std/functions/std-math-asin)
* [`atan`](/docs/kcl-std/functions/std-math-atan)
* [`atan2`](/docs/kcl-std/functions/std-math-atan2)
* [`ceil`](/docs/kcl-std/functions/std-math-ceil)
* [`cos`](/docs/kcl-std/functions/std-math-cos)
* [`floor`](/docs/kcl-std/functions/std-math-floor)
* [`ln`](/docs/kcl-std/functions/std-math-ln)
* [`log`](/docs/kcl-std/functions/std-math-log)
* [`log10`](/docs/kcl-std/functions/std-math-log10)
* [`log2`](/docs/kcl-std/functions/std-math-log2)
* [`max`](/docs/kcl-std/functions/std-math-max)
* [`min`](/docs/kcl-std/functions/std-math-min)
* [`polar`](/docs/kcl-std/functions/std-math-polar)
* [`pow`](/docs/kcl-std/functions/std-math-pow)
* [`rem`](/docs/kcl-std/functions/std-math-rem)
* [`round`](/docs/kcl-std/functions/std-math-round)
* [`sin`](/docs/kcl-std/functions/std-math-sin)
* [`sqrt`](/docs/kcl-std/functions/std-math-sqrt)
* [`tan`](/docs/kcl-std/functions/std-math-tan)

View File

@ -0,0 +1,16 @@
---
title: "std::sketch"
excerpt: ""
layout: manual
---
## Functions and constants
* [`circle`](/docs/kcl-std/functions/std-sketch-circle)
* [`mirror2d`](/docs/kcl-std/functions/std-sketch-mirror2d)

View File

@ -0,0 +1,18 @@
---
title: "std::solid"
excerpt: ""
layout: manual
---
## Functions and constants
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)
* [`shell`](/docs/kcl-std/functions/std-solid-shell)

View File

@ -0,0 +1,18 @@
---
title: "std::turns"
excerpt: ""
layout: manual
---
## Functions and constants
* [`turns::HALF_TURN`](/docs/kcl-std/consts/std-turns-HALF_TURN)
* [`turns::QUARTER_TURN`](/docs/kcl-std/consts/std-turns-QUARTER_TURN)
* [`turns::THREE_QUARTER_TURN`](/docs/kcl-std/consts/std-turns-THREE_QUARTER_TURN)
* [`turns::ZERO`](/docs/kcl-std/consts/std-turns-ZERO)

View File

@ -0,0 +1,29 @@
---
title: "std::types"
excerpt: ""
layout: manual
---
## Types
* [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d)
* [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d)
* [`Edge`](/docs/kcl-std/types/std-types-Edge)
* [`Face`](/docs/kcl-std/types/std-types-Face)
* [`Helix`](/docs/kcl-std/types/std-types-Helix)
* [`Plane`](/docs/kcl-std/types/std-types-Plane)
* [`Point2d`](/docs/kcl-std/types/std-types-Point2d)
* [`Point3d`](/docs/kcl-std/types/std-types-Point3d)
* [`Sketch`](/docs/kcl-std/types/std-types-Sketch)
* [`Solid`](/docs/kcl-std/types/std-types-Solid)
* [`any`](/docs/kcl-std/types/std-types-any)
* [`bool`](/docs/kcl-std/types/std-types-bool)
* [`number`](/docs/kcl-std/types/std-types-number)
* [`string`](/docs/kcl-std/types/std-types-string)
* [`tag`](/docs/kcl-std/types/std-types-tag)

View File

@ -0,0 +1,22 @@
---
title: "std::units"
excerpt: "Functions for converting numbers to different units. "
layout: manual
---
Functions for converting numbers to different units.
## Functions and constants
* [`units::toCentimeters`](/docs/kcl-std/functions/std-units-toCentimeters)
* [`units::toDegrees`](/docs/kcl-std/functions/std-units-toDegrees)
* [`units::toFeet`](/docs/kcl-std/functions/std-units-toFeet)
* [`units::toInches`](/docs/kcl-std/functions/std-units-toInches)
* [`units::toMeters`](/docs/kcl-std/functions/std-units-toMeters)
* [`units::toMillimeters`](/docs/kcl-std/functions/std-units-toMillimeters)
* [`units::toRadians`](/docs/kcl-std/functions/std-units-toRadians)
* [`units::toYards`](/docs/kcl-std/functions/std-units-toYards)

View File

@ -0,0 +1,33 @@
---
title: "std"
excerpt: "The KCL standard library "
layout: manual
---
The KCL standard library
Contains frequently used constants, functions for interacting with the KittyCAD servers to create sketches and geometry, and utility functions.
## Modules
* [`math`](/docs/kcl-std/modules/std-math)
* [`sketch`](/docs/kcl-std/modules/std-sketch)
* [`solid`](/docs/kcl-std/modules/std-solid)
* [`turns::turns`](/docs/kcl-std/modules/std-turns)
* [`types`](/docs/kcl-std/modules/std-types)
* [`units::units`](/docs/kcl-std/modules/std-units)
## Functions and constants
* [`END`](/docs/kcl-std/consts/std-END)
* [`START`](/docs/kcl-std/consts/std-START)
* [`X`](/docs/kcl-std/consts/std-X)
* [`XY`](/docs/kcl-std/consts/std-XY)
* [`XZ`](/docs/kcl-std/consts/std-XZ)
* [`Y`](/docs/kcl-std/consts/std-Y)
* [`YZ`](/docs/kcl-std/consts/std-YZ)
* [`Z`](/docs/kcl-std/consts/std-Z)
* [`helix`](/docs/kcl-std/functions/std-helix)
* [`offsetPlane`](/docs/kcl-std/functions/std-offsetPlane)
* [`revolve`](/docs/kcl-std/functions/std-revolve)

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