Compare commits
117 Commits
pierremtb/
...
nightly-v2
Author | SHA1 | Date | |
---|---|---|---|
d78648f0f8 | |||
fe31769be5 | |||
388371b05d | |||
9db69007e5 | |||
f2a6492ab7 | |||
3ddce116e5 | |||
57f7d022ca | |||
cbc12559c7 | |||
b3cd5ef3ba | |||
a094995730 | |||
46b4b01d23 | |||
4d1eaf9381 | |||
df3668adc8 | |||
270781d5cd | |||
96b93f8d51 | |||
59b1c414f0 | |||
fd07b8cff5 | |||
21efb2c0bd | |||
30029a63a1 | |||
9f5003cafc | |||
5232e1d40a | |||
23c25c2b50 | |||
50273c0edc | |||
8a03bf50e3 | |||
7500ef0065 | |||
099c48cd63 | |||
f35cd3ef26 | |||
695c432d1e | |||
2835665a6a | |||
45707d2974 | |||
b2e1d21d45 | |||
b98f5605b6 | |||
c050e03df1 | |||
b6fa4325f0 | |||
0804aecc63 | |||
3dfc2c86e1 | |||
71647ede29 | |||
cd679f4be3 | |||
18d87b99bd | |||
70a2202877 | |||
f5c9f84ae9 | |||
71f701dec7 | |||
bffbed1d42 | |||
9f60ed8e75 | |||
57b366b2d0 | |||
6f3f5dbda9 | |||
8dd25715fb | |||
834f7133d8 | |||
8c5662e458 | |||
f37fc357af | |||
e27e9ecc63 | |||
78b42ea191 | |||
5d02a27122 | |||
49d52ce94b | |||
a572d7b0db | |||
1f405b9327 | |||
0874891dd0 | |||
59d0e079a1 | |||
b9862baed0 | |||
592c5259c6 | |||
950f5cebfd | |||
4c0ea136e0 | |||
81c0035adc | |||
c68e5d7774 | |||
ed8a0e4aaa | |||
322f398049 | |||
bc4d254297 | |||
10b7a772bf | |||
86ba586318 | |||
cc313afb89 | |||
d0c8311e41 | |||
28311d160a | |||
162856064b | |||
652f82e8c3 | |||
d4d9bf6c7f | |||
0e9d37c0a0 | |||
9c18060d73 | |||
e2be66b024 | |||
1bb372b642 | |||
627fbda671 | |||
74bdb72edc | |||
a9182bf357 | |||
5f14023404 | |||
9a3ac64603 | |||
67e60cb832 | |||
110037df79 | |||
30b1dae38a | |||
f20fc5b467 | |||
1bfc3a0a3c | |||
f6e975db84 | |||
b82eec85fd | |||
5dc4213295 | |||
61807e7629 | |||
357bbffce5 | |||
6ac9c49773 | |||
020497cde2 | |||
688852a5df | |||
6c635bd70d | |||
1c0a38a1e2 | |||
019cb815f9 | |||
c8653beae7 | |||
9ea3cb51ba | |||
e0de0493ab | |||
11cac0c30e | |||
4de50edf5a | |||
bebace193d | |||
f4d5578faf | |||
fed922cfb8 | |||
2b7325655b | |||
d3b02b8c5b | |||
9008fb636f | |||
eb4048cd16 | |||
c30b161e95 | |||
0e68d03612 | |||
95fd14eedc | |||
3c367426c6 | |||
a277cce636 |
@ -1,5 +1,4 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
DEV=false
|
|
||||||
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
||||||
VITE_KC_SITE_BASE_URL=https://zoo.dev
|
VITE_KC_SITE_BASE_URL=https://zoo.dev
|
||||||
|
13
.gitattributes
vendored
Normal file
13
.gitattributes
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
|
||||||
|
# in Windows via a file share from Linux, the scripts will work.
|
||||||
|
*.{cmd,[cC][mM][dD]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{bat,[bB][aA][tT]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ics,[iI][cC][sS]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ps1,[iP][sS][1]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
|
||||||
|
# Force bash scripts to always use LF line endings so that if a repo is accessed
|
||||||
|
# in Unix via a file share from Windows, the scripts will work.
|
||||||
|
*.sh text eol=lfol=lf
|
2
.github/ci-cd-scripts/playwright-electron.sh
vendored
2
.github/ci-cd-scripts/playwright-electron.sh
vendored
@ -21,7 +21,7 @@ if [[ ! -f "test-results/.last-run.json" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
retry=1
|
retry=1
|
||||||
max_retrys=5
|
max_retrys=1
|
||||||
|
|
||||||
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
||||||
while [[ $retry -le $max_retrys ]]; do
|
while [[ $retry -le $max_retrys ]]; do
|
||||||
|
2
.github/workflows/cargo-test.yml
vendored
2
.github/workflows/cargo-test.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
cd "${{ matrix.dir }}"
|
cd "${{ matrix.dir }}"
|
||||||
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||||
env:
|
env:
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
RUST_MIN_STACK: 10485760000
|
RUST_MIN_STACK: 10485760000
|
||||||
|
22
.github/workflows/check-exampleKcl.yml
vendored
22
.github/workflows/check-exampleKcl.yml
vendored
@ -26,11 +26,21 @@ jobs:
|
|||||||
const issue_number = context.payload.pull_request.number;
|
const issue_number = context.payload.pull_request.number;
|
||||||
const owner = context.repo.owner;
|
const owner = context.repo.owner;
|
||||||
const repo = context.repo.repo;
|
const repo = context.repo.repo;
|
||||||
|
|
||||||
// Post a comment on the PR
|
const { data: comments } = await github.rest.issues.listComments({
|
||||||
await github.rest.issues.createComment({
|
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number,
|
issue_number
|
||||||
body: message,
|
});
|
||||||
});
|
|
||||||
|
const commentExists = comments.some(comment => comment.body === message);
|
||||||
|
|
||||||
|
if (!commentExists) {
|
||||||
|
// Post a comment on the PR
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number,
|
||||||
|
body: message,
|
||||||
|
});
|
||||||
|
}
|
9
.github/workflows/e2e-tests.yml
vendored
9
.github/workflows/e2e-tests.yml
vendored
@ -3,7 +3,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@ -201,9 +200,11 @@ jobs:
|
|||||||
- name: Run playwright/electron flow (with retries)
|
- name: Run playwright/electron flow (with retries)
|
||||||
id: retry
|
id: retry
|
||||||
if: ${{ !cancelled() && (success() || failure()) }}
|
if: ${{ !cancelled() && (success() || failure()) }}
|
||||||
shell: bash
|
uses: nick-fields/retry@v3.0.0
|
||||||
run: |
|
with:
|
||||||
.github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}}
|
command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}}
|
||||||
|
timeout_minutes: 30
|
||||||
|
max_attempts: 25
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
FAIL_ON_CONSOLE_ERRORS: true
|
FAIL_ON_CONSOLE_ERRORS: true
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -41,9 +41,12 @@ e2e/playwright/playwright-secrets.env
|
|||||||
e2e/playwright/temp1.png
|
e2e/playwright/temp1.png
|
||||||
e2e/playwright/temp2.png
|
e2e/playwright/temp2.png
|
||||||
e2e/playwright/temp3.png
|
e2e/playwright/temp3.png
|
||||||
|
# this will be overridden for specific directories
|
||||||
|
e2e/playwright/**/*.png
|
||||||
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
||||||
e2e/playwright/export-snapshots/*
|
e2e/playwright/export-snapshots/*
|
||||||
!e2e/playwright/export-snapshots/*.png
|
!e2e/playwright/export-snapshots/*.png
|
||||||
|
!e2e/playwright/snapshot-tests.spec.ts-snapshots/*.png
|
||||||
|
|
||||||
/kcl-samples
|
/kcl-samples
|
||||||
/test-results/
|
/test-results/
|
||||||
|
15
docs/kcl/HALF_TURN.md
Normal file
15
docs/kcl/HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/QUARTER_TURN.md
Normal file
15
docs/kcl/QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/ZERO.md
Normal file
15
docs/kcl/ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
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
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
@ -22,7 +22,7 @@ assert(data: bool, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -24,7 +24,7 @@ assertEqual(left: number, right: number, epsilon: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertGreaterThan(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertGreaterThanOrEq(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertLessThan(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertLessThanOrEq(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### 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
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
@ -26,7 +26,7 @@ cm() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
32
docs/kcl/const_E.md
Normal file
32
docs/kcl/const_E.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_HALF_TURN.md
Normal file
15
docs/kcl/const_HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
28
docs/kcl/const_PI.md
Normal file
28
docs/kcl/const_PI.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_QUARTER_TURN.md
Normal file
15
docs/kcl/const_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
32
docs/kcl/const_TAU.md
Normal file
32
docs/kcl/const_TAU.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_ZERO.md
Normal file
15
docs/kcl/const_ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
32
docs/kcl/const_const_std-math-E.md
Normal file
32
docs/kcl/const_const_std-math-E.md
Normal file
File diff suppressed because one or more lines are too long
28
docs/kcl/const_const_std-math-PI.md
Normal file
28
docs/kcl/const_const_std-math-PI.md
Normal file
File diff suppressed because one or more lines are too long
32
docs/kcl/const_const_std-math-TAU.md
Normal file
32
docs/kcl/const_const_std-math-TAU.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_const_std-prelude-HALF_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-QUARTER_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-ZERO.md
Normal file
15
docs/kcl/const_const_std-prelude-ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
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
@ -26,7 +26,7 @@ ft() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### 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
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
@ -26,7 +26,7 @@ inch() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -9,110 +9,117 @@ layout: manual
|
|||||||
* [Types](kcl/types)
|
* [Types](kcl/types)
|
||||||
* [Modules](kcl/modules)
|
* [Modules](kcl/modules)
|
||||||
* [Known Issues](kcl/KNOWN-ISSUES)
|
* [Known Issues](kcl/KNOWN-ISSUES)
|
||||||
* [`abs`](kcl/abs)
|
* **`std`**
|
||||||
* [`acos`](kcl/acos)
|
* [`abs`](kcl/abs)
|
||||||
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
* [`acos`](kcl/acos)
|
||||||
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
||||||
* [`angledLine`](kcl/angledLine)
|
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
||||||
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
* [`angledLine`](kcl/angledLine)
|
||||||
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
||||||
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
||||||
* [`angledLineToX`](kcl/angledLineToX)
|
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||||
* [`angledLineToY`](kcl/angledLineToY)
|
* [`angledLineToX`](kcl/angledLineToX)
|
||||||
* [`appearance`](kcl/appearance)
|
* [`angledLineToY`](kcl/angledLineToY)
|
||||||
* [`arc`](kcl/arc)
|
* [`appearance`](kcl/appearance)
|
||||||
* [`arcTo`](kcl/arcTo)
|
* [`arc`](kcl/arc)
|
||||||
* [`asin`](kcl/asin)
|
* [`arcTo`](kcl/arcTo)
|
||||||
* [`assert`](kcl/assert)
|
* [`asin`](kcl/asin)
|
||||||
* [`assertEqual`](kcl/assertEqual)
|
* [`assert`](kcl/assert)
|
||||||
* [`assertGreaterThan`](kcl/assertGreaterThan)
|
* [`assertEqual`](kcl/assertEqual)
|
||||||
* [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq)
|
* [`assertGreaterThan`](kcl/assertGreaterThan)
|
||||||
* [`assertLessThan`](kcl/assertLessThan)
|
* [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq)
|
||||||
* [`assertLessThanOrEq`](kcl/assertLessThanOrEq)
|
* [`assertLessThan`](kcl/assertLessThan)
|
||||||
* [`atan`](kcl/atan)
|
* [`assertLessThanOrEq`](kcl/assertLessThanOrEq)
|
||||||
* [`atan2`](kcl/atan2)
|
* [`atan`](kcl/atan)
|
||||||
* [`bezierCurve`](kcl/bezierCurve)
|
* [`atan2`](kcl/atan2)
|
||||||
* [`ceil`](kcl/ceil)
|
* [`bezierCurve`](kcl/bezierCurve)
|
||||||
* [`chamfer`](kcl/chamfer)
|
* [`ceil`](kcl/ceil)
|
||||||
* [`circle`](kcl/circle)
|
* [`chamfer`](kcl/chamfer)
|
||||||
* [`circleThreePoint`](kcl/circleThreePoint)
|
* [`circle`](kcl/circle)
|
||||||
* [`close`](kcl/close)
|
* [`circleThreePoint`](kcl/circleThreePoint)
|
||||||
* [`cm`](kcl/cm)
|
* [`close`](kcl/close)
|
||||||
* [`cos`](kcl/cos)
|
* [`cm`](kcl/cm)
|
||||||
* [`e`](kcl/e)
|
* [`extrude`](kcl/extrude)
|
||||||
* [`extrude`](kcl/extrude)
|
* [`fillet`](kcl/fillet)
|
||||||
* [`fillet`](kcl/fillet)
|
* [`floor`](kcl/floor)
|
||||||
* [`floor`](kcl/floor)
|
* [`ft`](kcl/ft)
|
||||||
* [`ft`](kcl/ft)
|
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||||
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||||
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
||||||
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
* [`helix`](kcl/helix)
|
||||||
* [`helix`](kcl/helix)
|
* [`helixRevolutions`](kcl/helixRevolutions)
|
||||||
* [`helixRevolutions`](kcl/helixRevolutions)
|
* [`hole`](kcl/hole)
|
||||||
* [`hole`](kcl/hole)
|
* [`hollow`](kcl/hollow)
|
||||||
* [`hollow`](kcl/hollow)
|
* [`inch`](kcl/inch)
|
||||||
* [`inch`](kcl/inch)
|
* [`lastSegX`](kcl/lastSegX)
|
||||||
* [`lastSegX`](kcl/lastSegX)
|
* [`lastSegY`](kcl/lastSegY)
|
||||||
* [`lastSegY`](kcl/lastSegY)
|
* [`legAngX`](kcl/legAngX)
|
||||||
* [`legAngX`](kcl/legAngX)
|
* [`legAngY`](kcl/legAngY)
|
||||||
* [`legAngY`](kcl/legAngY)
|
* [`legLen`](kcl/legLen)
|
||||||
* [`legLen`](kcl/legLen)
|
* [`line`](kcl/line)
|
||||||
* [`line`](kcl/line)
|
* [`ln`](kcl/ln)
|
||||||
* [`ln`](kcl/ln)
|
* [`loft`](kcl/loft)
|
||||||
* [`loft`](kcl/loft)
|
* [`log`](kcl/log)
|
||||||
* [`log`](kcl/log)
|
* [`log10`](kcl/log10)
|
||||||
* [`log10`](kcl/log10)
|
* [`log2`](kcl/log2)
|
||||||
* [`log2`](kcl/log2)
|
* [`m`](kcl/m)
|
||||||
* [`m`](kcl/m)
|
* [`map`](kcl/map)
|
||||||
* [`map`](kcl/map)
|
* [`max`](kcl/max)
|
||||||
* [`max`](kcl/max)
|
* [`min`](kcl/min)
|
||||||
* [`min`](kcl/min)
|
* [`mirror2d`](kcl/mirror2d)
|
||||||
* [`mirror2d`](kcl/mirror2d)
|
* [`mm`](kcl/mm)
|
||||||
* [`mm`](kcl/mm)
|
* [`offsetPlane`](kcl/offsetPlane)
|
||||||
* [`offsetPlane`](kcl/offsetPlane)
|
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||||
* [`patternLinear2d`](kcl/patternLinear2d)
|
* [`patternLinear3d`](kcl/patternLinear3d)
|
||||||
* [`patternLinear3d`](kcl/patternLinear3d)
|
* [`patternTransform`](kcl/patternTransform)
|
||||||
* [`patternTransform`](kcl/patternTransform)
|
* [`patternTransform2d`](kcl/patternTransform2d)
|
||||||
* [`patternTransform2d`](kcl/patternTransform2d)
|
* [`polar`](kcl/polar)
|
||||||
* [`pi`](kcl/pi)
|
* [`polygon`](kcl/polygon)
|
||||||
* [`polar`](kcl/polar)
|
* [`pop`](kcl/pop)
|
||||||
* [`polygon`](kcl/polygon)
|
* [`pow`](kcl/pow)
|
||||||
* [`pop`](kcl/pop)
|
* [`profileStart`](kcl/profileStart)
|
||||||
* [`pow`](kcl/pow)
|
* [`profileStartX`](kcl/profileStartX)
|
||||||
* [`profileStart`](kcl/profileStart)
|
* [`profileStartY`](kcl/profileStartY)
|
||||||
* [`profileStartX`](kcl/profileStartX)
|
* [`push`](kcl/push)
|
||||||
* [`profileStartY`](kcl/profileStartY)
|
* [`reduce`](kcl/reduce)
|
||||||
* [`push`](kcl/push)
|
* [`rem`](kcl/rem)
|
||||||
* [`reduce`](kcl/reduce)
|
* [`revolve`](kcl/revolve)
|
||||||
* [`rem`](kcl/rem)
|
* [`round`](kcl/round)
|
||||||
* [`revolve`](kcl/revolve)
|
* [`segAng`](kcl/segAng)
|
||||||
* [`round`](kcl/round)
|
* [`segEnd`](kcl/segEnd)
|
||||||
* [`segAng`](kcl/segAng)
|
* [`segEndX`](kcl/segEndX)
|
||||||
* [`segEnd`](kcl/segEnd)
|
* [`segEndY`](kcl/segEndY)
|
||||||
* [`segEndX`](kcl/segEndX)
|
* [`segLen`](kcl/segLen)
|
||||||
* [`segEndY`](kcl/segEndY)
|
* [`segStart`](kcl/segStart)
|
||||||
* [`segLen`](kcl/segLen)
|
* [`segStartX`](kcl/segStartX)
|
||||||
* [`segStart`](kcl/segStart)
|
* [`segStartY`](kcl/segStartY)
|
||||||
* [`segStartX`](kcl/segStartX)
|
* [`shell`](kcl/shell)
|
||||||
* [`segStartY`](kcl/segStartY)
|
* [`sqrt`](kcl/sqrt)
|
||||||
* [`shell`](kcl/shell)
|
* [`startProfileAt`](kcl/startProfileAt)
|
||||||
* [`sin`](kcl/sin)
|
* [`startSketchOn`](kcl/startSketchOn)
|
||||||
* [`sqrt`](kcl/sqrt)
|
* [`sweep`](kcl/sweep)
|
||||||
* [`startProfileAt`](kcl/startProfileAt)
|
* [`tangentToEnd`](kcl/tangentToEnd)
|
||||||
* [`startSketchOn`](kcl/startSketchOn)
|
* [`tangentialArc`](kcl/tangentialArc)
|
||||||
* [`sweep`](kcl/sweep)
|
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
||||||
* [`tan`](kcl/tan)
|
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
|
||||||
* [`tangentToEnd`](kcl/tangentToEnd)
|
* [`toDegrees`](kcl/toDegrees)
|
||||||
* [`tangentialArc`](kcl/tangentialArc)
|
* [`toRadians`](kcl/toRadians)
|
||||||
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
* [`xLine`](kcl/xLine)
|
||||||
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
|
* [`xLineTo`](kcl/xLineTo)
|
||||||
* [`tau`](kcl/tau)
|
* [`yLine`](kcl/yLine)
|
||||||
* [`toDegrees`](kcl/toDegrees)
|
* [`yLineTo`](kcl/yLineTo)
|
||||||
* [`toRadians`](kcl/toRadians)
|
* [`yd`](kcl/yd)
|
||||||
* [`xLine`](kcl/xLine)
|
* **`std::math`**
|
||||||
* [`xLineTo`](kcl/xLineTo)
|
* [`E`](kcl/const_std-math-E)
|
||||||
* [`yLine`](kcl/yLine)
|
* [`PI`](kcl/const_std-math-PI)
|
||||||
* [`yLineTo`](kcl/yLineTo)
|
* [`TAU`](kcl/const_std-math-TAU)
|
||||||
* [`yd`](kcl/yd)
|
* [`cos`](kcl/std-math-cos)
|
||||||
|
* [`sin`](kcl/std-math-sin)
|
||||||
|
* [`tan`](kcl/std-math-tan)
|
||||||
|
* **`std::prelude`**
|
||||||
|
* [`HALF_TURN`](kcl/const_std-prelude-HALF_TURN)
|
||||||
|
* [`QUARTER_TURN`](kcl/const_std-prelude-QUARTER_TURN)
|
||||||
|
* [`THREE_QUARTER_TURN`](kcl/const_std-prelude-THREE_QUARTER_TURN)
|
||||||
|
* [`ZERO`](kcl/const_std-prelude-ZERO)
|
||||||
|
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
@ -26,7 +26,7 @@ legAngX(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -26,7 +26,7 @@ legAngY(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -26,7 +26,7 @@ legLen(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### 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
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
@ -26,7 +26,7 @@ m() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -9,7 +9,7 @@ Apply a function to every element of a list.
|
|||||||
Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(c)]`
|
Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(c)]`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
map(array: [KclValue], map_fn: FunctionParam) -> [KclValue]
|
map(array: [KclValue], map_fn: FunctionSource) -> [KclValue]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -18,11 +18,11 @@ map(array: [KclValue], map_fn: FunctionParam) -> [KclValue]
|
|||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | | Yes |
|
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | | Yes |
|
||||||
| `map_fn` | `FunctionParam` | | Yes |
|
| `map_fn` | `FunctionSource` | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[KclValue]`](/docs/kcl/types/KclValue)
|
[`[KclValue]`](/docs/kcl/types/KclValue)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### 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
@ -26,7 +26,7 @@ mm() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -57,3 +57,55 @@ Imported symbols can be renamed for convenience or to avoid name collisions.
|
|||||||
```
|
```
|
||||||
import increment as inc, decrement as dec from "util.kcl"
|
import increment as inc, decrement as dec from "util.kcl"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Importing files from other CAD systems
|
||||||
|
|
||||||
|
`import` can also be used to import files from other CAD systems. The format of the statement is the
|
||||||
|
same as for KCL files. You can only import the whole file, not items from it. E.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
import "tests/inputs/cube.obj"
|
||||||
|
|
||||||
|
// Use `cube` just like a KCL object.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
import "tests/inputs/cube-2.sldprt" as cube
|
||||||
|
|
||||||
|
// Use `cube` just like a KCL object.
|
||||||
|
```
|
||||||
|
|
||||||
|
You can make the file format explicit using a format attribute (useful if using a different
|
||||||
|
extension), e.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
@(format = obj)
|
||||||
|
import "tests/inputs/cube"
|
||||||
|
```
|
||||||
|
|
||||||
|
For formats lacking unit data (such as STL, OBJ, or PLY files), the default
|
||||||
|
unit of measurement is millimeters. Alternatively you may specify the unit
|
||||||
|
by using an attirbute. Likewise, you can also specify a coordinate system. E.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
@(unitLength = ft, coords = opengl)
|
||||||
|
import "tests/inputs/cube.obj"
|
||||||
|
```
|
||||||
|
|
||||||
|
When importing a GLTF file, the bin file will be imported as well.
|
||||||
|
|
||||||
|
Import paths are relative to the current project directory. Imports currently only work when
|
||||||
|
using the native Modeling App, not in the browser.
|
||||||
|
|
||||||
|
### Supported values
|
||||||
|
|
||||||
|
File formats: `fbx`, `gltf`/`glb`, `obj`+, `ply`+, `sldprt`, `step`/`stp`, `stl`+. (Those marked with a
|
||||||
|
'+' support customising the length unit and coordinate system).
|
||||||
|
|
||||||
|
Length units: `mm` (the default), `cm`, `m`, `inch`, `ft`, `yd`.
|
||||||
|
|
||||||
|
Coordinate systems:
|
||||||
|
|
||||||
|
- `zoo` (the default), forward: -Y, up: +Z, handedness: right
|
||||||
|
- `opengl`, forward: +Z, up: +Y, handedness: right
|
||||||
|
- `vulkan`, forward: +Z, up: -Y, handedness: left
|
||||||
|
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
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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user