Compare commits

...

31 Commits

Author SHA1 Message Date
252fde9be6 demo zoom not working 2024-10-02 08:34:56 +10:00
cd91774881 add unit tests for stdlib autocompletes etc (#4066)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-10-01 13:11:09 -07:00
88cd27425e Initial kcl to core codegen (C++) util (#2999)
* wip on this

* wip on kcl-to-core tool

* Update conn_mock_core.rs

* stopping point

* wip

* use enum for is_mock for added versatility

* get at least circular patterns working to finish POC

* fmt

* fmt part 2

* Update Cargo.lock

* quick fix for tests

* quick fix

* more fixes

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* get more cases of this working

* Update src/wasm-lib/kcl-to-core/src/conn_mock_core.rs

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* kcl core gen plane code by default

* fmt

* fix build?

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Fix clippy errors

* Remove unneeded clippy allow

* post merge build fix attempt

* Add missing indexmap dependency

* Fix to use IndexMap instead of HashMap

* Migrate to kittycad-modeling-cmds

* fix build

* fmt

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"

This reverts commit 991cdde15e.

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"

This reverts commit a4ae03c740.

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"

This reverts commit 9a082e7c9f.

* Regenerate derive_docs

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"

This reverts commit a8bdb35627.

* Fix e2e test failing by masking state indicator

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Confirm snapshot change

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Confirm snapshot change

* Fix build from last merge with main

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-10-01 19:45:01 +00:00
a284a270b7 Fix e2e test failing by masking state indicator (#4064)
* Fix e2e test failing by masking state indicator

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Confirm snapshot change

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Confirm snapshot change

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 18:14:12 +00:00
e2f5ad47a2 bump reqwests and http and kittycad.rs (#4065)
bump reqwests

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-10-01 11:05:44 -07:00
2a3693651a KCL stdlib 'map' function (#4054)
I had to revert https://github.com/KittyCAD/modeling-app/pull/4031 because it broke syntax highlighting. This is the same PR, but updated to fix syntax highlighting.

Highlighting broke because the KCL LSP could not determine how to autocomplete the `map` function. The first argument of `map` is `[KclValue]` and the LSP doesn't know any good suggestions for "any KCL value", so it error'd out. I am using the value `[0..9]` for this case now. Tested that syntax highlighting works again.
2024-10-01 08:50:23 -05:00
9ca49c6366 Split artifacts per arch and re-enable updater for nightly builds (#3921)
* Split builds per os and per architecture to minimize artifacts size
Fixes #3920

* Add missing if case; Add nightly build updater support

* Fix linux x86_64
2024-10-01 08:25:41 -04:00
2a2e4a8b63 Revert "KCL stdlib 'map' function (#4031)"
It broke the KCL LSP.

This reverts commit a3c0a2b03b.
2024-09-30 21:03:50 -05:00
258bce8adc Rename arrayReduce to reduce (#4030)
I think when we make reduce work with objects,
we'll either keep the same function and make it
polymorphic, or we'll have namespaces/modules and
use Array.reduce and Object.reduce. Either way this
name can be changed.
2024-09-30 20:03:28 -05:00
a3c0a2b03b KCL stdlib 'map' function (#4031)
KCL: New 'map' stdlib function.

map(f, [1, 2, ...]) == [f(1), f(2), ...]
2024-09-30 19:37:41 -05:00
2ed2e9cf86 Bump kittycad from 0.3.20 to 0.3.22 in /src/wasm-lib (#4036)
Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.3.20 to 0.3.22.
- [Release notes](https://github.com/KittyCAD/kittycad.rs/releases)
- [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.3.20...v0.3.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 15:35:07 -07:00
438d1ec746 Bump syn from 2.0.77 to 2.0.79 in /src/wasm-lib (#4035)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.77 to 2.0.79.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.77...2.0.79)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 15:34:57 -07:00
5112b48324 Should exit sketchMode when creating new file in the file tree pane (#3993)
* fix new file sketch mode issue

* initial extron app fixture

* Add tests for exiting sketch mode on file tree actions

* organise files

* before all after all clean up

* tweak after each

* makes typedKeys as unsafe

* update mask for draft line snapshots

* fix mask

* add fix again
2024-09-30 21:56:04 +00:00
8cb17a8936 fix token.txt (#4037)
* fix token.txt

* try and make windowns happy

* fmt
2024-09-30 21:01:21 +00:00
125207f60c KCL: If-else expressions (#4022)
Closes https://github.com/KittyCAD/modeling-app/issues/3677

You can review each commit separately, they're neat commits with logical purpose in each.

Future enhancements:

- https://github.com/KittyCAD/modeling-app/issues/4015
- https://github.com/KittyCAD/modeling-app/issues/4020
- Right now the parser errors are not very good, especially if you forget to put an expression in the end of an if/else block
2024-09-30 15:40:50 -05:00
6dfadbea18 Cut release v0.25.5 (#4046) 2024-09-30 14:41:16 -05:00
0d48dff151 dont escape the markdown shit (#4049)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-30 12:39:24 -07:00
f74b436e3d use the jsonschema::RootSchema instead of accidentally inventing our own (#4047)
* updates

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* empty

* updates

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

* updates

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

* fix clippy

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"

This reverts commit 64cee26626.

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-30 12:30:22 -07:00
bb3f9e0377 KCL docs improvements (#4043)
* Preserve paragraph breaks in the KCL docs

The KCL docs on the website are hard to read, because they concatenate all
the paragraphs in my nicely-formatted docstrings in the stdlib functions
into one big paragraph. PR should fix this.

* Fix arc docs being split into two lines

The 'summary' section of the docs has a maximum line length, and if you
go over that length, your summary gets split into two lines weirdly.

Makes the arc docs shorter, so the summary is back to one line like
it should be.

* Update docs for pattern transform
2024-09-30 11:43:16 -07:00
02be831c67 Bump wasm-streams from 0.4.0 to 0.4.1 in /src/wasm-lib (#4034)
Bumps [wasm-streams](https://github.com/MattiasBuelens/wasm-streams) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/MattiasBuelens/wasm-streams/releases)
- [Changelog](https://github.com/MattiasBuelens/wasm-streams/blob/main/CHANGELOG.md)
- [Commits](https://github.com/MattiasBuelens/wasm-streams/compare/v0.4.0...v0.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 09:38:54 -07:00
2e72f235dd Add a user-level projection setting, command, and toggle (#3983)
* Add cameraProjection setting

* Add UI to toggle the user-level projection setting.

* Make cameraProjection setting respected at startup

* Add an E2E test for the perspective toggle

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Don't force user back into perspective when exiting sketch

* Make the projection setting more searchable

* Make `current` label apply to the default option if not set

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Re-run CI

* Ohh *cargo fmt*

* @lf94 feedback, fix found toggling bug, make command bar instantly toggle setting

* Roll back the instant toggling behavior, it breaks the tests

* Make ortho the default, keep tests using perspective

* Move projection below camera controls setting

* Fix up gizmo tests, which broke because the gizmo moved

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* Look at this (photo)Graph *in the voice of Nickelback*

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
2024-09-30 11:40:00 -04:00
3949b6acf4 Opening KCL sample now overwrites units (#3970)
* Implement basic unit overwriting, update tests

* fix eslint warning

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"

This reverts commit 2ecf012c25.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-30 10:12:59 -04:00
168f4fc545 Bump kittycad-modeling-cmds (#4032) 2024-09-29 14:31:08 -05:00
85541c76f5 add in min max data (#4029) 2024-09-28 13:19:05 -07:00
7ed29e2ce4 more recursive docs types (#4028)
* more recursive

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

* updates;

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* updates

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

* updates

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

* fixes

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

* add the format

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

* updates

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

* get the descriptions again

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

* updates

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* updates

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-28 11:51:08 -07:00
2a35dd2398 one more pass of docs (#4026) 2024-09-27 23:03:48 -07:00
790af3842c Recusive docs (#4023)
updates



updates



updates



updates



updates



updates



better



updates



array of



updates



updates



updates



updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-27 19:50:44 -07:00
37bb696a30 preserve order of struct in autocomplete (#4018)
fix #3110 preserve order of struct in autocomplete

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-28 01:23:46 +00:00
e50de134b1 renames sketch group/extrude group (#4016)
* renames

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

updates

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

updates

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

updates

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

updates

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

updates

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

fixups

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

updates

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

udpates

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

fix parse

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

fix typos

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

docs

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

update tests

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

empty

* fix;

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

* new

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

* add the types pages

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

* updates

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

* fixes

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

* Look at this (photo)Graph *in the voice of Nickelback*

* empty

* updates

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-27 15:44:44 -07:00
9a437ca973 Updates path docs for website (#4019)
* fix docs paths for website

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

* fix docs paths for website

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

* updates

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-27 14:26:53 -07:00
30bcf21912 KCL: Global rotation is fixed (#4017)
Also, there were some executor unit tests to test pattern transform. I realized they make more sense as example tests in the KCL stdlib for pattern transform. This way, they show up in the docs too. So I removed the unit tests (the examples now test these features instead).

Big thanks to Serena for fixing this on the engine side!

Also looks like the pictures from artifact graph were deleted, so GH Actions wants to put it back.
2024-09-27 16:23:45 -05:00
346 changed files with 154957 additions and 294967 deletions

View File

@ -1,2 +1,3 @@
src/wasm-lib/*
*.typegen.ts
packages/codemirror-lsp-client/dist/*

View File

@ -51,8 +51,6 @@ jobs:
run: |
VERSION=$(date +'%-y.%-m.%-d') yarn bump-jsons
# TODO: see if we need to inject updater nightly URL here https://dl.zoo.dev/releases/modeling-app/nightly/last_update.json
- uses: actions/upload-artifact@v3
with:
name: prepared-files
@ -63,12 +61,25 @@ jobs:
- id: export_version
run: echo "version=`cat package.json | jq -r '.version'`" >> "$GITHUB_OUTPUT"
- name: Prepare electron-builder.yml file for nightly
if: ${{ github.event_name == 'schedule' }}
run: |
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' electron-builder.yml
- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'schedule' }}
with:
name: prepared-files-nightly
path: |
electron-builder.yml
- name: Prepare electron-builder.yml file for updater test
if: ${{ env.CUT_RELEASE_PR == 'true' }}
run: |
yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/updater-test"' electron-builder.yml
- uses: actions/upload-artifact@v3
if: ${{ env.CUT_RELEASE_PR == 'true' }}
with:
name: prepared-files-updater-test
path: |
@ -108,6 +119,16 @@ jobs:
mkdir src/wasm-lib/pkg
cp prepared-files/src/wasm-lib/pkg/wasm_lib* src/wasm-lib/pkg
- uses: actions/download-artifact@v3
if: ${{ github.event_name == 'schedule' }}
name: prepared-files-nightly
- name: Copy updated electron-builder.yml file for nightly build
if: ${{ github.event_name == 'schedule' }}
run: |
ls -R prepared-files-nightly
cp prepared-files-nightly/electron-builder.yml electron-builder.yml
- name: Sync node version and setup cache
uses: actions/setup-node@v4
with:
@ -152,11 +173,17 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: out-${{ matrix.os }}
name: out-arm64-${{ matrix.os }}
path: |
out/Zoo*.*
out/Zoo*arm64*.*
out/latest*.yml
- uses: actions/upload-artifact@v3
with:
name: out-x64-${{ matrix.os }}
path: |
out/Zoo*x*64*.*
# TODO: add the 'Build for Mac TestFlight (nightly)' stage back
- uses: actions/download-artifact@v3
@ -176,10 +203,16 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ env.CUT_RELEASE_PR == 'true' }}
with:
name: updater-test-${{ matrix.os }}
name: updater-test-arm64-${{ matrix.os }}
path: |
out/Zoo*.*
out/latest*.yml
out/Zoo*arm64*.*
- uses: actions/upload-artifact@v3
if: ${{ env.CUT_RELEASE_PR == 'true' }}
with:
name: updater-test-x64-${{ matrix.os }}
path: |
out/Zoo*x64*.*
publish-apps-release:
@ -201,17 +234,32 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: out-windows-2022
name: out-arm64-windows-2022
path: out
- uses: actions/download-artifact@v3
with:
name: out-macos-14
name: out-x64-windows-2022
path: out
- uses: actions/download-artifact@v3
with:
name: out-ubuntu-22.04
name: out-arm64-macos-14
path: out
- uses: actions/download-artifact@v3
with:
name: out-x64-macos-14
path: out
- uses: actions/download-artifact@v3
with:
name: out-arm64-ubuntu-22.04
path: out
- uses: actions/download-artifact@v3
with:
name: out-x64-ubuntu-22.04
path: out
- name: Generate the download static endpoint

View File

@ -38,8 +38,10 @@ jobs:
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
# move new
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
mv -f docs/kcl/types documentation/content/pages/docs/kcl/
- name: commit the changes in the docs repo
shell: bash
run: |

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,10 @@ layout: manual
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 &#x27;x&#x27; dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.
```js
angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup
angledLineToX(data: AngledLineToData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
```
@ -17,13 +17,13 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclar
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineToData`](kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](kcl/types#tag-declaration) | | No |
| `data` | [`AngledLineToData`](/docs/kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
### Returns
[`SketchGroup`](kcl/types/SketchGroup) - A sketch group is a collection of paths.
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
### Examples

View File

@ -6,10 +6,10 @@ layout: manual
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 &#x27;y&#x27; dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.
```js
angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup
angledLineToY(data: AngledLineToData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
```
@ -17,13 +17,13 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclar
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineToData`](kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](kcl/types#tag-declaration) | | No |
| `data` | [`AngledLineToData`](/docs/kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
### Returns
[`SketchGroup`](kcl/types/SketchGroup) - A sketch group is a collection of paths.
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,10 @@ layout: manual
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&#x27;s shape.
the desired (x, y), using a number of control points to shape the curve's shape.
```js
bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup
bezierCurve(data: BezierData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
```
@ -17,13 +17,13 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) ->
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`BezierData`](kcl/types/BezierData) | Data to draw a bezier curve. | Yes |
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](kcl/types#tag-declaration) | | No |
| `data` | [`BezierData`](/docs/kcl/types/BezierData) | Data to draw a bezier curve. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
### Returns
[`SketchGroup`](kcl/types/SketchGroup) - A sketch group is a collection of paths.
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,12 @@ layout: manual
Centimeters conversion factor for current projects units.
No matter what units the current project uses, this function will always return the conversion factor to centimeters.
For example, if the current project uses inches, this function will return &#x60;0.393701&#x60;. If the current project uses millimeters, this function will return &#x60;10&#x60;. If the current project uses centimeters, this function will return &#x60;1&#x60;.
For example, if the current project uses inches, this function will return `0.393701`. If the current project uses millimeters, this function will return `10`. If the current project uses centimeters, this function will return `1`.
**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as &#x60;10 * cm()&#x60; is more readable that your intent is &quot;I want 10 centimeters&quot; than &#x60;10 * 10&#x60;, if the project settings are in millimeters.
We merely provide these functions for convenience and readability, as `10 * cm()` is more readable that your intent is "I want 10 centimeters" than `10 * 10`, if the project settings are in millimeters.
```js
cm() -> number

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ 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
extrude(length: number, sketch_group_set: SketchGroupSet) -> ExtrudeGroupSet
extrude(length: number, sketch_set: SketchSet) -> SolidSet
```
@ -18,11 +18,11 @@ extrude(length: number, sketch_group_set: SketchGroupSet) -> ExtrudeGroupSet
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `length` | `number` | | Yes |
| `sketch_group_set` | [`SketchGroupSet`](kcl/types/SketchGroupSet) | A sketch group or a group of sketch groups. | Yes |
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |
### Returns
[`ExtrudeGroupSet`](kcl/types/ExtrudeGroupSet) - A extrude group or a group of extrude groups.
[`SolidSet`](/docs/kcl/types/SolidSet) - A solid or a group of solids.
### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,12 @@ layout: manual
Feet conversion factor for current projects units.
No matter what units the current project uses, this function will always return the conversion factor to feet.
For example, if the current project uses inches, this function will return &#x60;12&#x60;. If the current project uses millimeters, this function will return &#x60;304.8&#x60;. If the current project uses feet, this function will return &#x60;1&#x60;.
For example, if the current project uses inches, this function will return `12`. If the current project uses millimeters, this function will return `304.8`. If the current project uses feet, this function will return `1`.
**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as &#x60;10 * ft()&#x60; is more readable that your intent is &quot;I want 10 feet&quot; than &#x60;10 * 304.8&#x60;, if the project settings are in millimeters.
We merely provide these functions for convenience and readability, as `10 * ft()` is more readable that your intent is "I want 10 feet" than `10 * 304.8`, if the project settings are in millimeters.
```js
ft() -> number

View File

@ -17,7 +17,7 @@ getNextAdjacentEdge(tag: TagIdentifier) -> Uuid
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `tag` | [`TagIdentifier`](kcl/types#tag-identifier) | | Yes |
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | | Yes |
### Returns

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.
```js
hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGroup
hole(hole_sketch: SketchSet, sketch: Sketch) -> Sketch
```
@ -17,12 +17,12 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `hole_sketch_group` | [`SketchGroupSet`](kcl/types/SketchGroupSet) | A sketch group or a group of sketch groups. | Yes |
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `hole_sketch` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
### Returns
[`SketchGroup`](kcl/types/SketchGroup) - A sketch group is a collection of paths.
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,12 @@ layout: manual
Inches conversion factor for current projects units.
No matter what units the current project uses, this function will always return the conversion factor to inches.
For example, if the current project uses inches, this function will return &#x60;1&#x60;. If the current project uses millimeters, this function will return &#x60;25.4&#x60;.
For example, if the current project uses inches, this function will return `1`. If the current project uses millimeters, this function will return `25.4`.
**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as &#x60;10 * inch()&#x60; is more readable that your intent is &quot;I want 10 inches&quot; than &#x60;10 * 25.4&#x60;, if the project settings are in millimeters.
We merely provide these functions for convenience and readability, as `10 * inch()` is more readable that your intent is "I want 10 inches" than `10 * 25.4`, if the project settings are in millimeters.
```js
inch() -> number

View File

@ -19,7 +19,6 @@ layout: manual
* [`angledLineToX`](kcl/angledLineToX)
* [`angledLineToY`](kcl/angledLineToY)
* [`arc`](kcl/arc)
* [`arrayReduce`](kcl/arrayReduce)
* [`asin`](kcl/asin)
* [`assert`](kcl/assert)
* [`assertEqual`](kcl/assertEqual)
@ -62,6 +61,7 @@ layout: manual
* [`log10`](kcl/log10)
* [`log2`](kcl/log2)
* [`m`](kcl/m)
* [`map`](kcl/map)
* [`max`](kcl/max)
* [`min`](kcl/min)
* [`mirror2d`](kcl/mirror2d)
@ -78,6 +78,7 @@ layout: manual
* [`profileStart`](kcl/profileStart)
* [`profileStartX`](kcl/profileStartX)
* [`profileStartY`](kcl/profileStartY)
* [`reduce`](kcl/reduce)
* [`rem`](kcl/rem)
* [`revolve`](kcl/revolve)
* [`segAng`](kcl/segAng)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,15 @@
---
title: "lastSegY"
excerpt: "Extract the &#x27;y&#x27; axis value of the last line segment in the provided 2-d"
excerpt: "Extract the 'y' axis value of the last line segment in the provided 2-d"
layout: manual
---
Extract the &#x27;y&#x27; axis value of the last line segment in the provided 2-d
Extract the 'y' axis value of the last line segment in the provided 2-d
sketch.
```js
lastSegY(sketch_group: SketchGroup) -> number
lastSegY(sketch: Sketch) -> number
```
@ -17,7 +17,7 @@ lastSegY(sketch_group: SketchGroup) -> number
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
### Returns

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ Draw a line from the current origin to some absolute (x, y) point.
```js
lineTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup
lineTo(to: [number], sketch: Sketch, tag?: TagDeclarator) -> Sketch
```
@ -17,13 +17,13 @@ lineTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGr
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `to` | [`[number]`](kcl/types/[number]) | | Yes |
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](kcl/types#tag-declaration) | | No |
| `to` | `[number]` | | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
### Returns
[`SketchGroup`](kcl/types/SketchGroup) - A sketch group is a collection of paths.
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
### Examples

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ layout: manual
Compute the logarithm of the number with respect to an arbitrary base.
The result might not be correctly rounded owing to implementation details; &#x60;log2()&#x60; can produce more accurate results for base 2, and &#x60;log10()&#x60; 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.
```js
log(num: number, base: number) -> number

View File

@ -7,9 +7,12 @@ layout: manual
Meters conversion factor for current projects units.
No matter what units the current project uses, this function will always return the conversion factor to meters.
For example, if the current project uses inches, this function will return &#x60;39.3701&#x60;. If the current project uses millimeters, this function will return &#x60;1000&#x60;. If the current project uses meters, this function will return &#x60;1&#x60;.
For example, if the current project uses inches, this function will return `39.3701`. If the current project uses millimeters, this function will return `1000`. If the current project uses meters, this function will return `1`.
**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as &#x60;10 * m()&#x60; is more readable that your intent is &quot;I want 10 meters&quot; than &#x60;10 * 1000&#x60;, if the project settings are in millimeters.
We merely provide these functions for convenience and readability, as `10 * m()` is more readable that your intent is "I want 10 meters" than `10 * 1000`, if the project settings are in millimeters.
```js
m() -> number

56
docs/kcl/map.md Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,12 @@ layout: manual
Millimeters conversion factor for current projects units.
No matter what units the current project uses, this function will always return the conversion factor to millimeters.
For example, if the current project uses inches, this function will return &#x60;(1/25.4)&#x60;. If the current project uses millimeters, this function will return &#x60;1&#x60;.
For example, if the current project uses inches, this function will return `(1/25.4)`. If the current project uses millimeters, this function will return `1`.
**Caution**: This function is only intended to be used when you absolutely MUST have different units in your code than the project settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as &#x60;10 * mm()&#x60; is more readable that your intent is &quot;I want 10 millimeters&quot; than &#x60;10 * (1/25.4)&#x60;, if the project settings are in inches.
We merely provide these functions for convenience and readability, as `10 * mm()` is more readable that your intent is "I want 10 millimeters" than `10 * (1/25.4)`, if the project settings are in inches.
```js
mm() -> number

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,11 +17,11 @@ polar(data: PolarCoordsData) -> [number]
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`PolarCoordsData`](kcl/types/PolarCoordsData) | Data for polar coordinates. | Yes |
| `data` | [`PolarCoordsData`](/docs/kcl/types/PolarCoordsData) | Data for polar coordinates. | Yes |
### Returns
[`[number]`](kcl/types/[number])
`[number]`
### Examples

View File

@ -1,15 +1,15 @@
---
title: "profileStart"
excerpt: "Extract the provided 2-dimensional sketch group&#x27;s profile&#x27;s origin"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin"
layout: manual
---
Extract the provided 2-dimensional sketch group&#x27;s profile&#x27;s origin
Extract the provided 2-dimensional sketch's profile's origin
value.
```js
profileStart(sketch_group: SketchGroup) -> [number]
profileStart(sketch: Sketch) -> [number]
```
@ -17,11 +17,11 @@ profileStart(sketch_group: SketchGroup) -> [number]
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
### Returns
[`[number]`](kcl/types/[number])
`[number]`
### Examples

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,15 @@
---
title: "profileStartY"
excerpt: "Extract the provided 2-dimensional sketch group&#x27;s profile&#x27;s origin&#x27;s &#x27;y&#x27;"
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'y'"
layout: manual
---
Extract the provided 2-dimensional sketch group&#x27;s profile&#x27;s origin&#x27;s &#x27;y&#x27;
Extract the provided 2-dimensional sketch's profile's origin's 'y'
value.
```js
profileStartY(sketch_group: SketchGroup) -> number
profileStartY(sketch: Sketch) -> number
```
@ -17,7 +17,7 @@ profileStartY(sketch_group: SketchGroup) -> number
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch_group` | [`SketchGroup`](kcl/types/SketchGroup) | A sketch group is a collection of paths. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
### Returns

47
docs/kcl/reduce.md Normal file

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
---
title: "segEndX"
excerpt: "Compute the ending point of the provided line segment along the &#x27;x&#x27; axis."
excerpt: "Compute the ending point of the provided line segment along the 'x' axis."
layout: manual
---
Compute the ending point of the provided line segment along the &#x27;x&#x27; axis.
Compute the ending point of the provided line segment along the 'x' axis.
@ -17,7 +17,7 @@ segEndX(tag: TagIdentifier) -> number
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `tag` | [`TagIdentifier`](kcl/types#tag-identifier) | | Yes |
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | | Yes |
### Returns

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@ segLen(tag: TagIdentifier) -> number
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `tag` | [`TagIdentifier`](kcl/types#tag-identifier) | | Yes |
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | | Yes |
### Returns

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,30 +8,26 @@ Data to draw an angled line.
**This schema accepts any of the following:**
An angle and length with explicitly named parameters
**Type:** `object`
[`PolarCoordsData`](/docs/kcl/types/PolarCoordsData)
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `angle` |`number` (`double`)| The angle of the line (in degrees). | No |
| `length` |`number` (`double`)| The length of the line. | No |
----
An angle and length given as a pair
**Type:** `array`
`[number, number]`

View File

@ -6,18 +6,18 @@ layout: manual
Data for drawing an angled line that intersects with a given line.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `angle` |`number` (`double`)| The angle of the line. | No |
| `intersectTag` |`object`| The tag of the line to intersect with. | No |
| `offset` |`number` (`double`)| The offset from the intersecting line. | No |
| `angle` |`number`| The angle of the line. | No |
| `intersectTag` |[`TagIdentifier`](/docs/kcl/types#tag-identifier)| The tag of the line to intersect with. | No |
| `offset` |`number`| The offset from the intersecting line. | No |

View File

@ -6,17 +6,17 @@ layout: manual
Data to draw an angled line to a point.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `angle` |`number` (`double`)| The angle of the line. | No |
| `to` |`number` (`double`)| The point to draw to. | No |
| `angle` |`number`| The angle of the line. | No |
| `to` |`number`| The point to draw to. | No |

View File

@ -8,41 +8,42 @@ Data to draw an arc.
**This schema accepts any of the following:**
Angles and radius with an optional tag.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `angleEnd` |`number` (`double`)| The end angle. | No |
| `angleStart` |`number` (`double`)| The start angle. | No |
| `radius` |`number` (`double`)| The radius. | No |
| `angleStart` |`number` (**maximum:** 360.0) (**minimum:** -360.0)| The start angle. | No |
| `angleEnd` |`number` (**maximum:** 360.0) (**minimum:** -360.0)| The end angle. | No |
| `radius` |`number`| The radius. | No |
----
Center, to and radius with an optional tag.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `center` |`array`| The center. | No |
| `radius` |`number` (`double`)| The radius. | No |
| `to` |`array`| The to point. | No |
| `center` |`[number, number]`| The center. | No |
| `to` |`[number, number]`| The to point. | No |
| `radius` |`number`| The radius. | No |
----

46
docs/kcl/types/Axis.md Normal file
View File

@ -0,0 +1,46 @@
---
title: "Axis"
excerpt: "Co-ordinate axis specifier."
layout: manual
---
Co-ordinate axis specifier.
See [cglearn.eu] for background reading.
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1
**This schema accepts exactly one of the following:**
'Y' axis.
**enum:** `y`
----
'Z' axis.
**enum:** `z`
----

View File

@ -0,0 +1,81 @@
---
title: "AxisAndOrigin"
excerpt: "Axis and origin."
layout: manual
---
Axis and origin.
**This schema accepts exactly one of the following:**
X-axis.
**enum:** `X`
----
Y-axis.
**enum:** `Y`
----
Flip the X-axis.
**enum:** `-X`
----
Flip the Y-axis.
**enum:** `-Y`
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `custom` |`object`| | No |
----

View File

@ -0,0 +1,22 @@
---
title: "AxisDirectionPair"
excerpt: "An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)]."
layout: manual
---
An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)].
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `axis` |[`Axis`](/docs/kcl/types/Axis)| Axis specifier. | No |
| `direction` |[`Direction`](/docs/kcl/types/Direction)| Specifies which direction the axis is pointing. | No |

View File

@ -0,0 +1,42 @@
---
title: "AxisOrEdgeReference"
excerpt: "Axis or tagged edge."
layout: manual
---
Axis or tagged edge.
**This schema accepts any of the following:**
Axis and origin.
[`AxisAndOrigin`](/docs/kcl/types/AxisAndOrigin)
----
Tagged edge.
[`EdgeReference`](/docs/kcl/types/EdgeReference)
----

View File

@ -0,0 +1,24 @@
---
title: "BasePath"
excerpt: "A base path."
layout: manual
---
A base path.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `from` |`[number, number]`| The from point. | No |
| `to` |`[number, number]`| The to point. | No |
| `tag` |[`TagDeclarator`](/docs/kcl/types#tag-declaration)| The tag of the path. | No |
| `__geoMeta` |[`GeoMeta`](/docs/kcl/types/GeoMeta)| Metadata. | No |

View File

@ -6,18 +6,18 @@ layout: manual
Data to draw a bezier curve.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `control1` |`array`| The first control point. | No |
| `control2` |`array`| The second control point. | No |
| `to` |`array`| The to point. | No |
| `to` |`[number, number]`| The to point. | No |
| `control1` |`[number, number]`| The first control point. | No |
| `control2` |`[number, number]`| The second control point. | No |

View File

@ -0,0 +1,89 @@
---
title: "BinaryOperator"
excerpt: ""
layout: manual
---
**This schema accepts exactly one of the following:**
Add two numbers.
**enum:** `+`
----
Subtract two numbers.
**enum:** `-`
----
Multiply two numbers.
**enum:** `*`
----
Divide two numbers.
**enum:** `/`
----
Modulo two numbers.
**enum:** `%`
----
Raise a number to a power.
**enum:** `^`
----

View File

@ -0,0 +1,161 @@
---
title: "BinaryPart"
excerpt: ""
layout: manual
---
**This schema accepts exactly one of the following:**
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Literal`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `value` |[`LiteralValue`](/docs/kcl/types/LiteralValue)| | No |
| `raw` |`string`| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: [`Identifier`](/docs/kcl/types/Identifier)| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `name` |`string`| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `BinaryExpression`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `operator` |[`BinaryOperator`](/docs/kcl/types/BinaryOperator)| | No |
| `left` |[`BinaryPart`](/docs/kcl/types/BinaryPart)| | No |
| `right` |[`BinaryPart`](/docs/kcl/types/BinaryPart)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `CallExpression`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `callee` |[`Identifier`](/docs/kcl/types/Identifier)| | No |
| `arguments` |`[` [`Expr`](/docs/kcl/types/Expr) `]`| | No |
| `optional` |`boolean`| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `UnaryExpression`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `operator` |[`UnaryOperator`](/docs/kcl/types/UnaryOperator)| | No |
| `argument` |[`BinaryPart`](/docs/kcl/types/BinaryPart)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `MemberExpression`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `object` |[`MemberObject`](/docs/kcl/types/MemberObject)| | No |
| `property` |[`LiteralIdentifier`](/docs/kcl/types/LiteralIdentifier)| | No |
| `computed` |`boolean`| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `IfExpression`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `cond` |[`Expr`](/docs/kcl/types/Expr)| | No |
| `then_val` |[`Program`](/docs/kcl/types/Program)| | No |
| `else_ifs` |`[` [`ElseIf`](/docs/kcl/types/ElseIf) `]`| | No |
| `final_else` |[`Program`](/docs/kcl/types/Program)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----

View File

@ -0,0 +1,75 @@
---
title: "BodyItem"
excerpt: ""
layout: manual
---
**This schema accepts exactly one of the following:**
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `ExpressionStatement`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `expression` |[`Expr`](/docs/kcl/types/Expr)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `VariableDeclaration`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `declarations` |`[` [`VariableDeclarator`](/docs/kcl/types/VariableDeclarator) `]`| | No |
| `kind` |[`VariableKind`](/docs/kcl/types/VariableKind)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `ReturnStatement`| | No |
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `argument` |[`Expr`](/docs/kcl/types/Expr)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |
----

View File

@ -6,17 +6,17 @@ layout: manual
Data for chamfers.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `length` |`number` (`double`)| The length of the chamfer. | No |
| `tags` |`array`| The tags of the paths you want to chamfer. | No |
| `length` |`number`| The length of the chamfer. | No |
| `tags` |`[` [`EdgeReference`](/docs/kcl/types/EdgeReference) `]`| The tags of the paths you want to chamfer. | No |

View File

@ -6,17 +6,17 @@ layout: manual
Data for drawing an circle
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `center` |`array`| The center of the circle. | No |
| `radius` |`number` (`double`)| The circle radius | No |
| `center` |`[number, number]`| The center of the circle. | No |
| `radius` |`number`| The circle radius | No |

View File

@ -6,19 +6,19 @@ layout: manual
Data for a circular pattern on a 2D sketch.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `arcDegrees` |`number` (`double`)| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `center` |`array`| The center about which to make the pattern. This is a 2D vector. | No |
| `repetitions` |`integer` (`uint32`)| The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if &#x60;repetitions&#x60; is 1, the original entity will be copied once. | No |
| `repetitions` |[`Uint`](/docs/kcl/types/Uint)| The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. | No |
| `center` |`[number, number]`| The center about which to make the pattern. This is a 2D vector. | No |
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |

View File

@ -6,20 +6,20 @@ layout: manual
Data for a circular pattern on a 3D model.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `arcDegrees` |`number` (`double`)| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `axis` |`array`| The axis around which to make the pattern. This is a 3D vector. | No |
| `center` |`array`| The center about which to make the pattern. This is a 3D vector. | No |
| `repetitions` |`integer` (`uint32`)| The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if &#x60;repetitions&#x60; is 1, the original entity will be copied once. | No |
| `repetitions` |[`Uint`](/docs/kcl/types/Uint)| The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once. | No |
| `axis` |`[number, number, number]`| The axis around which to make the pattern. This is a 3D vector. | No |
| `center` |`[number, number, number]`| The center about which to make the pattern. This is a 3D vector. | No |
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |

View File

@ -0,0 +1,41 @@
---
title: "CommentStyle"
excerpt: ""
layout: manual
---
**This schema accepts exactly one of the following:**
Like // foo
**enum:** `line`
----
Like /* foo */
**enum:** `block`
----

View File

@ -0,0 +1,42 @@
---
title: "Direction"
excerpt: "Specifies the sign of a co-ordinate axis."
layout: manual
---
Specifies the sign of a co-ordinate axis.
**This schema accepts exactly one of the following:**
Increasing numbers.
**enum:** `positive`
----
Decreasing numbers.
**enum:** `negative`
----

58
docs/kcl/types/EdgeCut.md Normal file
View File

@ -0,0 +1,58 @@
---
title: "EdgeCut"
excerpt: "A fillet or a chamfer."
layout: manual
---
A fillet or a chamfer.
**This schema accepts exactly one of the following:**
A fillet.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `fillet`| | No |
| `id` |`string`| The id of the engine command that called this fillet. | No |
| `radius` |`number`| | No |
| `edgeId` |`string`| The engine id of the edge to fillet. | No |
| `tag` |[`TagDeclarator`](/docs/kcl/types#tag-declaration)| | No |
----
A chamfer.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `chamfer`| | No |
| `id` |`string`| The id of the engine command that called this chamfer. | No |
| `length` |`number`| | No |
| `edgeId` |`string`| The engine id of the edge to chamfer. | No |
| `tag` |[`TagDeclarator`](/docs/kcl/types#tag-declaration)| | No |
----

View File

@ -0,0 +1,41 @@
---
title: "EdgeReference"
excerpt: "A tag or a uuid of an edge."
layout: manual
---
A tag or a uuid of an edge.
**This schema accepts any of the following:**
A uuid of an edge.
**Type:** `string` (`uuid`)
----
A tag of an edge.
[`TagIdentifier`](/docs/kcl/types#tag-identifier)
----

24
docs/kcl/types/ElseIf.md Normal file
View File

@ -0,0 +1,24 @@
---
title: "ElseIf"
excerpt: ""
layout: manual
---
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `start` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `end` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `cond` |[`Expr`](/docs/kcl/types/Expr)| | No |
| `then_val` |[`Program`](/docs/kcl/types/Program)| | No |
| `digest` |`[, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`, `integer`]`| | No |

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