Compare commits
199 Commits
achalmers/
...
derive-doc
Author | SHA1 | Date | |
---|---|---|---|
e758c6cab0 | |||
c63ea8e445 | |||
7e0e0e1ee1 | |||
db3e2879bd | |||
7804079d8c | |||
571406fca3 | |||
a9e41a616d | |||
9a0b086e07 | |||
358184c634 | |||
85ac8bf7a3 | |||
544a327ee9 | |||
868a560e1a | |||
32a2835d0e | |||
4c93346f48 | |||
bfa8b8aca4 | |||
b1fe2dddb6 | |||
6d3f6c784e | |||
4904785bbd | |||
ca30fd44bd | |||
5d69a62324 | |||
0e04e20b97 | |||
1dac62067a | |||
86de039dc4 | |||
dce5833d79 | |||
f714c19890 | |||
f52128c41a | |||
39566174e7 | |||
3688c8a05e | |||
0025349e9a | |||
d8cc57b843 | |||
e76db4a621 | |||
027e947bd5 | |||
0983dcca22 | |||
846fc99bbc | |||
c258ede25c | |||
4cc1b3d5ed | |||
be0dd1512d | |||
a5156c3f5d | |||
8038b5d7a3 | |||
54b234360e | |||
465d933d53 | |||
ccd0c619a6 | |||
7b570bf525 | |||
44d1c29801 | |||
0e916cfd5b | |||
e773e932b0 | |||
2d39fd32ce | |||
5a585a6c2d | |||
c09d6ee6bd | |||
09b55259ab | |||
68b61c9832 | |||
469ca94437 | |||
1d3850b46a | |||
0358343285 | |||
38b0603fa2 | |||
e48a8b6c5d | |||
73e573b251 | |||
793409d53d | |||
3e9ab16c4b | |||
ab226bc86f | |||
97677e4474 | |||
37fbc8c9ab | |||
29d61da552 | |||
ad2f669ec6 | |||
d66aad8b5d | |||
d8b8710a0d | |||
8f8ba2dca5 | |||
970b0abb54 | |||
06b464816f | |||
08f7bb2811 | |||
197df9f25d | |||
4d387dfaf7 | |||
912b97bea5 | |||
3e4ce44dc9 | |||
c2058a05fa | |||
7a57965690 | |||
c5b115ba97 | |||
90057c2dda | |||
f3e59690d6 | |||
9642a44a02 | |||
252c7651ac | |||
79edcf3826 | |||
b05ac3a05f | |||
1d01ba454b | |||
bf1d6963fe | |||
176ee63cb9 | |||
1ae8059c2b | |||
93f406d005 | |||
e97833f0ed | |||
35417dd8a6 | |||
cf0560dcfb | |||
3659946653 | |||
156c51484a | |||
dc8dd4bc72 | |||
335add67bd | |||
231794a69d | |||
8e5a6bc6fc | |||
4f82121105 | |||
46358b41a2 | |||
59274b76bf | |||
d11d363f19 | |||
f22ad7c4e7 | |||
1913519f68 | |||
4b9d4fd45b | |||
78e6816b06 | |||
6607ea1663 | |||
644a8ef3ca | |||
e3e132c0d5 | |||
be3fed8427 | |||
cefa6f85fe | |||
47ff4623bd | |||
69ff651201 | |||
788ae5dbab | |||
816870253e | |||
4987965731 | |||
042ceb42fd | |||
f40cdabfdf | |||
13cd3e179b | |||
a2176d9a1b | |||
fab5c47978 | |||
61d7950ca3 | |||
0579ccd53b | |||
cede44aacf | |||
e8149fca97 | |||
c571b15318 | |||
d3d2612a3b | |||
17b7c687d4 | |||
5d7d15a385 | |||
4be9f70965 | |||
a60bdd4cc3 | |||
6bab45a56a | |||
2d979b56f5 | |||
dfc51e6c30 | |||
7e40464d10 | |||
83fcdd52a2 | |||
8a30d5ec8f | |||
637c4a7d97 | |||
604446dba3 | |||
ed3952900b | |||
f934a17417 | |||
59fa7b13a5 | |||
8b2bf00641 | |||
73b7d3cc9d | |||
82fb227868 | |||
db5657a298 | |||
cd158f8db0 | |||
0342d1a5b4 | |||
cad64fb780 | |||
fbc458b6e6 | |||
dd852c2652 | |||
3395f34552 | |||
4ac40d5a78 | |||
8ccbb3a419 | |||
77e9a35c4d | |||
0d1852bbc3 | |||
ff9229f55a | |||
5a7f12a06d | |||
06f1257071 | |||
328e7faea9 | |||
5792d3eb2b | |||
15effddf6c | |||
5354ce140a | |||
a994338541 | |||
6c22154df1 | |||
4c18255b70 | |||
42b247bc99 | |||
7d7b176bb7 | |||
9aada41a0d | |||
23971465ce | |||
23e294930b | |||
22cc4c9a98 | |||
fe6478f568 | |||
1989734c3b | |||
f36984f52a | |||
5437538892 | |||
97bd60ae87 | |||
9116d79c50 | |||
b3b5dff60f | |||
55f842d3bd | |||
778478757e | |||
bc303fbaab | |||
d422f09045 | |||
adcf80331a | |||
4fbd7ace98 | |||
0df858b9ca | |||
c6f080c440 | |||
c1a14a107a | |||
3c721f2b29 | |||
61e2a1eddc | |||
6406e27794 | |||
1e382a76dd | |||
06cdaa9ae8 | |||
85c30be333 | |||
4d4a1d66e8 | |||
223b5952aa | |||
fedffbb384 | |||
ed4e3df3b2 | |||
18d200e790 | |||
0c50a5996d |
@ -1,3 +1,3 @@
|
||||
[codespell]
|
||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo
|
||||
skip: **/target,node_modules,build,**/Cargo.lock
|
||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey
|
||||
skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md
|
||||
|
50
.github/workflows/cargo-build.yml
vendored
@ -1,50 +0,0 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.rs'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/rust-toolchain.toml'
|
||||
- .github/workflows/cargo-build.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.rs'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/rust-toolchain.toml'
|
||||
- .github/workflows/cargo-build.yml
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
name: cargo build
|
||||
jobs:
|
||||
cargobuild:
|
||||
name: cargo build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
dir: ['src/wasm-lib']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: install dependencies
|
||||
if: matrix.dir == 'src-tauri'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.6.1
|
||||
|
||||
- name: Run cargo build
|
||||
run: |
|
||||
cd "${{ matrix.dir }}"
|
||||
cargo build --all
|
||||
shell: bash
|
6
.github/workflows/cargo-clippy.yml
vendored
@ -9,12 +9,6 @@ on:
|
||||
- '**.rs'
|
||||
- .github/workflows/cargo-clippy.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/rust-toolchain.toml'
|
||||
- '**.rs'
|
||||
- .github/workflows/cargo-build.yml
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
17
.github/workflows/cargo-test.yml
vendored
@ -3,14 +3,15 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.rs'
|
||||
- 'src/wasm-lib/**.rs'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/rust-toolchain.toml'
|
||||
- .github/workflows/cargo-test.yml
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.rs'
|
||||
- 'src/wasm-lib/**.rs'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/rust-toolchain.toml'
|
||||
@ -20,7 +21,7 @@ permissions: read-all
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
name: cargo test
|
||||
name: cargo test of wasm-lib
|
||||
jobs:
|
||||
cargotest:
|
||||
name: cargo test
|
||||
@ -62,8 +63,16 @@ jobs:
|
||||
shell: bash
|
||||
run: |-
|
||||
cd "${{ matrix.dir }}"
|
||||
cargo nextest run --workspace --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||
cargo llvm-cov nextest --all --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||
env:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
RUST_MIN_STACK: 10485760000
|
||||
- name: Upload to codecov.io
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
fail_ci_if_error: true
|
||||
flags: wasm-lib
|
||||
verbose: true
|
||||
files: lcov.info
|
||||
|
||||
|
36
.github/workflows/check-exampleKcl.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Check Onboarding KCL
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- 'src/lib/exampleKcl.ts'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Comment on PR
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const message = '`src/lib/exampleKcl.ts` has been updated in this PR, please review and update the `src/routes/onboarding`, if needed.';
|
||||
const issue_number = context.payload.pull_request.number;
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
// Post a comment on the PR
|
||||
await github.rest.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number,
|
||||
body: message,
|
||||
});
|
4
.github/workflows/ci.yml
vendored
@ -367,7 +367,7 @@ jobs:
|
||||
|
||||
- name: Upload release files to Github
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: 'artifact/*/Zoo*'
|
||||
|
||||
@ -394,4 +394,4 @@ jobs:
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
||||
RELEASE_BODY: ${{ github.event.release.body}}
|
||||
run: python public/announce_release.py
|
||||
run: python public/announce_release.py
|
||||
|
62
.github/workflows/generate-website-docs.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/generate-website-docs.yml
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/generate-website-docs.yml
|
||||
workflow_dispatch:
|
||||
name: generate-website-docs
|
||||
concurrency:
|
||||
group: docs-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
generate-website-docs:
|
||||
name: generate-website-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
# required
|
||||
app-id: ${{ secrets.GH_ORG_APP_ID }}
|
||||
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
# Checkout the docs repo since we will want to update the files there.
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kittycad/documentation'
|
||||
path: 'documentation'
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
- name: move docs to docs
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p documentation/content/pages/docs/kcl/
|
||||
# cleanup old
|
||||
rm -rf documentation/content/pages/docs/kcl/*.md
|
||||
# move new
|
||||
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
|
||||
- name: commit the changes in the docs repo
|
||||
shell: bash
|
||||
run: |
|
||||
cd documentation
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add .
|
||||
git commit -am "YOYO NEW KCL DOCS!!" || exit 0
|
||||
git fetch origin
|
||||
git rebase origin/main || exit 0
|
||||
export NEW_BRANCH="update-kcl-docs"
|
||||
git checkout -b "$NEW_BRANCH"
|
||||
git push -f origin "$NEW_BRANCH"
|
||||
gh pr create --title "Update KCL docs" \
|
||||
--body "Updating the generated kcl docs cc @jessfraz @franknoirot merge this" \
|
||||
--head "$NEW_BRANCH" \
|
||||
--base main || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
9
.github/workflows/playwright.yml
vendored
@ -9,17 +9,21 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
playwright-ubuntu:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
- uses: KittyCAD/action-install-cli@v0.2.21
|
||||
- uses: KittyCAD/action-install-cli@main
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
- name: Install Playwright Browsers
|
||||
@ -85,7 +89,6 @@ jobs:
|
||||
playwright-macos:
|
||||
timeout-minutes: 60
|
||||
runs-on: macos-14
|
||||
needs: playwright-ubuntu
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
|
11
.gitignore
vendored
@ -33,17 +33,14 @@ src/wasm-lib/bindings
|
||||
src/wasm-lib/kcl/bindings
|
||||
public/wasm_lib_bg.wasm
|
||||
src/wasm-lib/lcov.info
|
||||
src/wasm-lib/grackle/test_json_output
|
||||
|
||||
e2e/playwright/playwright-secrets.env
|
||||
e2e/playwright/temp1.png
|
||||
e2e/playwright/temp2.png
|
||||
# exports from snapshot-tests.spec.ts
|
||||
e2e/playwright/export-snapshots/*.ply
|
||||
e2e/playwright/export-snapshots/*.obj
|
||||
e2e/playwright/export-snapshots/*.step
|
||||
e2e/playwright/export-snapshots/*.stl
|
||||
e2e/playwright/export-snapshots/*binary.gltf
|
||||
e2e/playwright/export-snapshots/*embedded.gltf
|
||||
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
||||
e2e/playwright/export-snapshots/*
|
||||
!e2e/playwright/export-snapshots/*.png
|
||||
|
||||
|
||||
/test-results/
|
||||
|
@ -141,7 +141,7 @@ run `./make-release.sh` for a patch update
|
||||
run `./make-release.sh "minor"` for minor
|
||||
run `./make-release.sh "major"` for major
|
||||
|
||||
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and past in the following
|
||||
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and paste in the following
|
||||
|
||||
```typescript
|
||||
console.log(
|
||||
|
@ -1,4 +1,8 @@
|
||||
# Known Issues
|
||||
---
|
||||
title: "KCL Known Issues"
|
||||
excerpt: "Known issues with the KCL standard library for the Zoo Modeling App."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
The following are bugs that are not in modeling-app or kcl itself. These bugs
|
||||
once fixed in engine will just start working here with no language changes.
|
||||
@ -12,3 +16,5 @@ once fixed in engine will just start working here with no language changes.
|
||||
you cannot edit it, after v1, the engine will account for this. You also cannot
|
||||
currently move or transform the imported objects at all, once we have assemblies
|
||||
this will work.
|
||||
|
||||
- **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet cases work currently.
|
||||
|
34
docs/kcl/abs.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "abs"
|
||||
excerpt: "Computes the absolute value of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the absolute value of a number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
abs(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = abs(-4)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/acos.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "acos"
|
||||
excerpt: "Computes the arccosine of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the arccosine of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
acos(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = acos(0.5)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
206
docs/kcl/angleToMatchLengthX.md
Normal file
206
docs/kcl/angleToMatchLengthY.md
Normal file
379
docs/kcl/angledLine.md
Normal file
379
docs/kcl/angledLineOfXLength.md
Normal file
380
docs/kcl/angledLineOfYLength.md
Normal file
385
docs/kcl/angledLineThatIntersects.md
Normal file
379
docs/kcl/angledLineToX.md
Normal file
378
docs/kcl/angledLineToY.md
Normal file
389
docs/kcl/arc.md
Normal file
34
docs/kcl/asin.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "asin"
|
||||
excerpt: "Computes the arcsine of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the arcsine of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
asin(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = asin(0.5)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/atan.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "atan"
|
||||
excerpt: "Computes the arctangent of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the arctangent of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
atan(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = atan(1.0)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
382
docs/kcl/bezierCurve.md
Normal file
34
docs/kcl/ceil.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "ceil"
|
||||
excerpt: "Computes the smallest integer greater than or equal to a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the smallest integer greater than or equal to a number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
ceil(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = ceil(4.5)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
439
docs/kcl/circle.md
Normal file
377
docs/kcl/close.md
Normal file
34
docs/kcl/cos.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "cos"
|
||||
excerpt: "Computes the cosine of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the cosine of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
cos(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const anotherVar = cos(2 * pi())
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
33
docs/kcl/e.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "e"
|
||||
excerpt: "Return the value of Euler’s number `e`."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Return the value of Euler’s number `e`.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
e() -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = e()
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
334
docs/kcl/extrude.md
Normal file
309
docs/kcl/fillet.md
Normal file
34
docs/kcl/floor.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "floor"
|
||||
excerpt: "Computes the largest integer less than or equal to a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the largest integer less than or equal to a number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
floor(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = floor(4.5)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
180
docs/kcl/getEdge.md
Normal file
177
docs/kcl/getExtrudeWallTransform.md
Normal file
173
docs/kcl/getNextAdjacentEdge.md
Normal file
173
docs/kcl/getOppositeEdge.md
Normal file
173
docs/kcl/getPreviousAdjacentEdge.md
Normal file
308
docs/kcl/helix.md
Normal file
540
docs/kcl/hole.md
Normal file
136
docs/kcl/import.md
Normal file
@ -0,0 +1,136 @@
|
||||
---
|
||||
title: "import"
|
||||
excerpt: "Import a CAD file."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Import a CAD file.
|
||||
|
||||
For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.
|
||||
Import paths are relative to the current project directory. This only works in the desktop app not in browser.
|
||||
|
||||
```js
|
||||
import(file_path: String, options?: ImportFormat) -> ImportedGeometry
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const model = import("thing.obj")
|
||||
```
|
||||
|
||||
```js
|
||||
const model = import("cube.obj", { type: "obj", units: "m" })
|
||||
```
|
||||
|
||||
```js
|
||||
const model = import("my_model.gltf")
|
||||
```
|
||||
|
||||
```js
|
||||
const model = import("my_model.sldprt")
|
||||
```
|
||||
|
||||
```js
|
||||
const model = import("my_model.step")
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `file_path`: `String` (REQUIRED)
|
||||
* `options`: `ImportFormat` - Import format specifier (OPTIONAL)
|
||||
```js
|
||||
{
|
||||
type: "fbx",
|
||||
} |
|
||||
{
|
||||
type: "gltf",
|
||||
} |
|
||||
{
|
||||
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||
coords: {
|
||||
// Axis the front face of a model looks along.
|
||||
forward: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
// Axis pointing up and away from a model.
|
||||
up: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
},
|
||||
type: "obj",
|
||||
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||
} |
|
||||
{
|
||||
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||
coords: {
|
||||
// Axis the front face of a model looks along.
|
||||
forward: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
// Axis pointing up and away from a model.
|
||||
up: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
},
|
||||
type: "ply",
|
||||
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||
} |
|
||||
{
|
||||
type: "sldprt",
|
||||
} |
|
||||
{
|
||||
type: "step",
|
||||
} |
|
||||
{
|
||||
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
|
||||
coords: {
|
||||
// Axis the front face of a model looks along.
|
||||
forward: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
// Axis pointing up and away from a model.
|
||||
up: {
|
||||
// Axis specifier.
|
||||
axis: "y" | "z",
|
||||
// Specifies which direction the axis is pointing.
|
||||
direction: "positive" | "negative",
|
||||
},
|
||||
},
|
||||
type: "stl",
|
||||
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
|
||||
units: "cm" | "ft" | "in" | "m" | "mm" | "yd",
|
||||
}
|
||||
```
|
||||
|
||||
### Returns
|
||||
|
||||
`ImportedGeometry` - Data for an imported geometry.
|
||||
```js
|
||||
{
|
||||
// The ID of the imported geometry.
|
||||
id: uuid,
|
||||
// The original file paths.
|
||||
value: [string],
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
79
docs/kcl/index.md
Normal file
@ -0,0 +1,79 @@
|
||||
---
|
||||
title: "KCL Standard Library"
|
||||
excerpt: "Documentation for the KCL standard library for the Zoo Modeling App."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Types](kcl/types)
|
||||
* [Known Issues](kcl/KNOWN-ISSUES)
|
||||
* [`abs`](kcl/abs)
|
||||
* [`acos`](kcl/acos)
|
||||
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
||||
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
||||
* [`angledLine`](kcl/angledLine)
|
||||
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
||||
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
||||
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||
* [`angledLineToX`](kcl/angledLineToX)
|
||||
* [`angledLineToY`](kcl/angledLineToY)
|
||||
* [`arc`](kcl/arc)
|
||||
* [`asin`](kcl/asin)
|
||||
* [`atan`](kcl/atan)
|
||||
* [`bezierCurve`](kcl/bezierCurve)
|
||||
* [`ceil`](kcl/ceil)
|
||||
* [`circle`](kcl/circle)
|
||||
* [`close`](kcl/close)
|
||||
* [`cos`](kcl/cos)
|
||||
* [`e`](kcl/e)
|
||||
* [`extrude`](kcl/extrude)
|
||||
* [`fillet`](kcl/fillet)
|
||||
* [`floor`](kcl/floor)
|
||||
* [`getEdge`](kcl/getEdge)
|
||||
* [`getExtrudeWallTransform`](kcl/getExtrudeWallTransform)
|
||||
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
||||
* [`helix`](kcl/helix)
|
||||
* [`hole`](kcl/hole)
|
||||
* [`import`](kcl/import)
|
||||
* [`lastSegX`](kcl/lastSegX)
|
||||
* [`lastSegY`](kcl/lastSegY)
|
||||
* [`legAngX`](kcl/legAngX)
|
||||
* [`legAngY`](kcl/legAngY)
|
||||
* [`legLen`](kcl/legLen)
|
||||
* [`line`](kcl/line)
|
||||
* [`lineTo`](kcl/lineTo)
|
||||
* [`ln`](kcl/ln)
|
||||
* [`log`](kcl/log)
|
||||
* [`log10`](kcl/log10)
|
||||
* [`log2`](kcl/log2)
|
||||
* [`max`](kcl/max)
|
||||
* [`min`](kcl/min)
|
||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||
* [`patternLinear3d`](kcl/patternLinear3d)
|
||||
* [`pi`](kcl/pi)
|
||||
* [`pow`](kcl/pow)
|
||||
* [`revolve`](kcl/revolve)
|
||||
* [`segAng`](kcl/segAng)
|
||||
* [`segEndX`](kcl/segEndX)
|
||||
* [`segEndY`](kcl/segEndY)
|
||||
* [`segLen`](kcl/segLen)
|
||||
* [`sin`](kcl/sin)
|
||||
* [`sqrt`](kcl/sqrt)
|
||||
* [`startProfileAt`](kcl/startProfileAt)
|
||||
* [`startSketchAt`](kcl/startSketchAt)
|
||||
* [`startSketchOn`](kcl/startSketchOn)
|
||||
* [`tan`](kcl/tan)
|
||||
* [`tangentialArc`](kcl/tangentialArc)
|
||||
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
||||
* [`tau`](kcl/tau)
|
||||
* [`toDegrees`](kcl/toDegrees)
|
||||
* [`toRadians`](kcl/toRadians)
|
||||
* [`xLine`](kcl/xLine)
|
||||
* [`xLineTo`](kcl/xLineTo)
|
||||
* [`yLine`](kcl/yLine)
|
||||
* [`yLineTo`](kcl/yLineTo)
|
203
docs/kcl/lastSegX.md
Normal file
203
docs/kcl/lastSegY.md
Normal file
35
docs/kcl/legAngX.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "legAngX"
|
||||
excerpt: "Returns the angle of the given leg for x."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Returns the angle of the given leg for x.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
legAngX(hypotenuse: number, leg: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `utilities`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
legAngX(5, 3)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `hypotenuse`: `number` (REQUIRED)
|
||||
* `leg`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
35
docs/kcl/legAngY.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "legAngY"
|
||||
excerpt: "Returns the angle of the given leg for y."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Returns the angle of the given leg for y.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
legAngY(hypotenuse: number, leg: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `utilities`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
legAngY(5, 3)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `hypotenuse`: `number` (REQUIRED)
|
||||
* `leg`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
35
docs/kcl/legLen.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "legLen"
|
||||
excerpt: "Returns the length of the given leg."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Returns the length of the given leg.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
legLen(hypotenuse: number, leg: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `utilities`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
legLen(5, 3)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `hypotenuse`: `number` (REQUIRED)
|
||||
* `leg`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
369
docs/kcl/line.md
Normal file
375
docs/kcl/lineTo.md
Normal file
34
docs/kcl/ln.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "ln"
|
||||
excerpt: "Computes the natural logarithm of the number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the natural logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
ln(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = ln(4)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
35
docs/kcl/log.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "log"
|
||||
excerpt: "Computes the logarithm of the number with respect to an arbitrary base."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the logarithm of the number with respect to an arbitrary base.
|
||||
|
||||
The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.
|
||||
|
||||
```js
|
||||
log(num: number, base: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = log(4, 2)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
* `base`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/log10.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "log10"
|
||||
excerpt: "Computes the base 10 logarithm of the number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the base 10 logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
log10(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = log10(4)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/log2.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "log2"
|
||||
excerpt: "Computes the base 2 logarithm of the number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the base 2 logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
log2(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = log2(4)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/max.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "max"
|
||||
excerpt: "Computes the maximum of the given arguments."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the maximum of the given arguments.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
max(args: [number]) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = max(4, 5, 6)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `args`: `[number]` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/min.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "min"
|
||||
excerpt: "Computes the minimum of the given arguments."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the minimum of the given arguments.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
min(args: [number]) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = min(4, 5, 6)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `args`: `[number]` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
217
docs/kcl/patternCircular2d.md
Normal file
190
docs/kcl/patternCircular3d.md
Normal file
214
docs/kcl/patternLinear2d.md
Normal file
184
docs/kcl/patternLinear3d.md
Normal file
33
docs/kcl/pi.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "pi"
|
||||
excerpt: "Return the value of `pi`. Archimedes’ constant (π)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Return the value of `pi`. Archimedes’ constant (π).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
pi() -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = pi() * 3.0
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
35
docs/kcl/pow.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "pow"
|
||||
excerpt: "Computes the number to a power."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the number to a power.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
pow(num: number, pow: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = pow(4, 2)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
* `pow`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
444
docs/kcl/revolve.md
Normal file
206
docs/kcl/segAng.md
Normal file
204
docs/kcl/segEndX.md
Normal file
204
docs/kcl/segEndY.md
Normal file
204
docs/kcl/segLen.md
Normal file
34
docs/kcl/sin.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "sin"
|
||||
excerpt: "Computes the sine of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the sine of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
sin(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = sin(2 * pi())
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/sqrt.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "sqrt"
|
||||
excerpt: "Computes the square root of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the square root of a number.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
sqrt(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = sqrt(4)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
263
docs/kcl/startProfileAt.md
Normal file
198
docs/kcl/startSketchAt.md
Normal file
292
docs/kcl/startSketchOn.md
Normal file
51200
docs/kcl/std.json
10512
docs/kcl/std.md
34
docs/kcl/tan.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "tan"
|
||||
excerpt: "Computes the tangent of a number (in radians)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Computes the tangent of a number (in radians).
|
||||
|
||||
|
||||
|
||||
```js
|
||||
tan(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = tan(2 * pi())
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
378
docs/kcl/tangentialArc.md
Normal file
368
docs/kcl/tangentialArcTo.md
Normal file
33
docs/kcl/tau.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "tau"
|
||||
excerpt: "Return the value of `tau`. The full circle constant (τ). Equal to 2π."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Return the value of `tau`. The full circle constant (τ). Equal to 2π.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
tau() -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = tau()
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/toDegrees.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "toDegrees"
|
||||
excerpt: "Converts a number from radians to degrees."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Converts a number from radians to degrees.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
toDegrees(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = toDegrees(2 * pi())
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
34
docs/kcl/toRadians.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "toRadians"
|
||||
excerpt: "Converts a number from degrees to radians."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Converts a number from degrees to radians.
|
||||
|
||||
|
||||
|
||||
```js
|
||||
toRadians(num: number) -> number
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
* `math`
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
const myVar = toRadians(180)
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
* `num`: `number` (REQUIRED)
|
||||
|
||||
### Returns
|
||||
|
||||
`number`
|
||||
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
# Types
|
||||
---
|
||||
title: "KCL Types"
|
||||
excerpt: "Documentation of types for the KCL standard library for the Zoo Modeling App."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
`KCL` defines the following types and keywords the language.
|
||||
|
||||
|
369
docs/kcl/xLine.md
Normal file
369
docs/kcl/xLineTo.md
Normal file
369
docs/kcl/yLine.md
Normal file
370
docs/kcl/yLineTo.md
Normal file
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 221 KiB |
BIN
e2e/playwright/export-snapshots/gltf-standard.png
Normal file
After Width: | Height: | Size: 221 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 221 KiB |
@ -1,494 +0,0 @@
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION((('zoo.dev export')), '2;1');
|
||||
FILE_NAME('dump.step', '1970-01-01T00:00:00.0+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown');
|
||||
FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1 = (
|
||||
LENGTH_UNIT()
|
||||
NAMED_UNIT(*)
|
||||
SI_UNIT($, .METRE.)
|
||||
);
|
||||
#2 = UNCERTAINTY_MEASURE_WITH_UNIT(0.00001, #1, 'DISTANCE_ACCURACY_VALUE', $);
|
||||
#3 = (
|
||||
GEOMETRIC_REPRESENTATION_CONTEXT(3)
|
||||
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#2))
|
||||
GLOBAL_UNIT_ASSIGNED_CONTEXT((#1))
|
||||
REPRESENTATION_CONTEXT('', '3D')
|
||||
);
|
||||
#4 = CARTESIAN_POINT('NONE', (0, 0, -0));
|
||||
#5 = VERTEX_POINT('NONE', #4);
|
||||
#6 = CARTESIAN_POINT('NONE', (0, -0.64516, -0));
|
||||
#7 = VERTEX_POINT('NONE', #6);
|
||||
#8 = CARTESIAN_POINT('NONE', (0, -0.64516, 2.58064));
|
||||
#9 = VERTEX_POINT('NONE', #8);
|
||||
#10 = CARTESIAN_POINT('NONE', (0, 0, 2.58064));
|
||||
#11 = VERTEX_POINT('NONE', #10);
|
||||
#12 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0));
|
||||
#13 = VERTEX_POINT('NONE', #12);
|
||||
#14 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064));
|
||||
#15 = VERTEX_POINT('NONE', #14);
|
||||
#16 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0));
|
||||
#17 = VERTEX_POINT('NONE', #16);
|
||||
#18 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, 2.58064));
|
||||
#19 = VERTEX_POINT('NONE', #18);
|
||||
#20 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0));
|
||||
#21 = VERTEX_POINT('NONE', #20);
|
||||
#22 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, 2.58064));
|
||||
#23 = VERTEX_POINT('NONE', #22);
|
||||
#24 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0));
|
||||
#25 = VERTEX_POINT('NONE', #24);
|
||||
#26 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, 2.58064));
|
||||
#27 = VERTEX_POINT('NONE', #26);
|
||||
#28 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0));
|
||||
#29 = VERTEX_POINT('NONE', #28);
|
||||
#30 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, 2.58064));
|
||||
#31 = VERTEX_POINT('NONE', #30);
|
||||
#32 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0));
|
||||
#33 = VERTEX_POINT('NONE', #32);
|
||||
#34 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064));
|
||||
#35 = VERTEX_POINT('NONE', #34);
|
||||
#36 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0));
|
||||
#37 = VERTEX_POINT('NONE', #36);
|
||||
#38 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, 2.58064));
|
||||
#39 = VERTEX_POINT('NONE', #38);
|
||||
#40 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0));
|
||||
#41 = VERTEX_POINT('NONE', #40);
|
||||
#42 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, 2.58064));
|
||||
#43 = VERTEX_POINT('NONE', #42);
|
||||
#44 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0));
|
||||
#45 = VERTEX_POINT('NONE', #44);
|
||||
#46 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, 2.58064));
|
||||
#47 = VERTEX_POINT('NONE', #46);
|
||||
#48 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0));
|
||||
#49 = VERTEX_POINT('NONE', #48);
|
||||
#50 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, 2.58064));
|
||||
#51 = VERTEX_POINT('NONE', #50);
|
||||
#52 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0));
|
||||
#53 = VERTEX_POINT('NONE', #52);
|
||||
#54 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, 2.58064));
|
||||
#55 = VERTEX_POINT('NONE', #54);
|
||||
#56 = CARTESIAN_POINT('NONE', (0, 0.64516, -0));
|
||||
#57 = VERTEX_POINT('NONE', #56);
|
||||
#58 = CARTESIAN_POINT('NONE', (0, 0.64516, 2.58064));
|
||||
#59 = VERTEX_POINT('NONE', #58);
|
||||
#60 = DIRECTION('NONE', (0, -1, 0));
|
||||
#61 = VECTOR('NONE', #60, 1);
|
||||
#62 = CARTESIAN_POINT('NONE', (0, 0, -0));
|
||||
#63 = LINE('NONE', #62, #61);
|
||||
#64 = DIRECTION('NONE', (0, 0, 1));
|
||||
#65 = VECTOR('NONE', #64, 1);
|
||||
#66 = CARTESIAN_POINT('NONE', (0, -0.64516, -0));
|
||||
#67 = LINE('NONE', #66, #65);
|
||||
#68 = DIRECTION('NONE', (0, -1, 0));
|
||||
#69 = VECTOR('NONE', #68, 1);
|
||||
#70 = CARTESIAN_POINT('NONE', (0, 0, 2.58064));
|
||||
#71 = LINE('NONE', #70, #69);
|
||||
#72 = DIRECTION('NONE', (0, 0, 1));
|
||||
#73 = VECTOR('NONE', #72, 1);
|
||||
#74 = CARTESIAN_POINT('NONE', (0, 0, -0));
|
||||
#75 = LINE('NONE', #74, #73);
|
||||
#76 = DIRECTION('NONE', (1, 0, 0));
|
||||
#77 = VECTOR('NONE', #76, 1);
|
||||
#78 = CARTESIAN_POINT('NONE', (0, -0.64516, -0));
|
||||
#79 = LINE('NONE', #78, #77);
|
||||
#80 = DIRECTION('NONE', (0, 0, 1));
|
||||
#81 = VECTOR('NONE', #80, 1);
|
||||
#82 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0));
|
||||
#83 = LINE('NONE', #82, #81);
|
||||
#84 = DIRECTION('NONE', (1, 0, 0));
|
||||
#85 = VECTOR('NONE', #84, 1);
|
||||
#86 = CARTESIAN_POINT('NONE', (0, -0.64516, 2.58064));
|
||||
#87 = LINE('NONE', #86, #85);
|
||||
#88 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0));
|
||||
#89 = VECTOR('NONE', #88, 1);
|
||||
#90 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0));
|
||||
#91 = LINE('NONE', #90, #89);
|
||||
#92 = DIRECTION('NONE', (0, 0, 1));
|
||||
#93 = VECTOR('NONE', #92, 1);
|
||||
#94 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0));
|
||||
#95 = LINE('NONE', #94, #93);
|
||||
#96 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0));
|
||||
#97 = VECTOR('NONE', #96, 1);
|
||||
#98 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064));
|
||||
#99 = LINE('NONE', #98, #97);
|
||||
#100 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0));
|
||||
#101 = VECTOR('NONE', #100, 1);
|
||||
#102 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0));
|
||||
#103 = LINE('NONE', #102, #101);
|
||||
#104 = DIRECTION('NONE', (0, 0, 1));
|
||||
#105 = VECTOR('NONE', #104, 1);
|
||||
#106 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0));
|
||||
#107 = LINE('NONE', #106, #105);
|
||||
#108 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0));
|
||||
#109 = VECTOR('NONE', #108, 1);
|
||||
#110 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, 2.58064));
|
||||
#111 = LINE('NONE', #110, #109);
|
||||
#112 = DIRECTION('NONE', (0, 1, 0));
|
||||
#113 = VECTOR('NONE', #112, 1);
|
||||
#114 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0));
|
||||
#115 = LINE('NONE', #114, #113);
|
||||
#116 = DIRECTION('NONE', (0, 0, 1));
|
||||
#117 = VECTOR('NONE', #116, 1);
|
||||
#118 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0));
|
||||
#119 = LINE('NONE', #118, #117);
|
||||
#120 = DIRECTION('NONE', (0, 1, 0));
|
||||
#121 = VECTOR('NONE', #120, 1);
|
||||
#122 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, 2.58064));
|
||||
#123 = LINE('NONE', #122, #121);
|
||||
#124 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#125 = VECTOR('NONE', #124, 1);
|
||||
#126 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0));
|
||||
#127 = LINE('NONE', #126, #125);
|
||||
#128 = DIRECTION('NONE', (0, 0, 1));
|
||||
#129 = VECTOR('NONE', #128, 1);
|
||||
#130 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0));
|
||||
#131 = LINE('NONE', #130, #129);
|
||||
#132 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#133 = VECTOR('NONE', #132, 1);
|
||||
#134 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, 2.58064));
|
||||
#135 = LINE('NONE', #134, #133);
|
||||
#136 = DIRECTION('NONE', (-0.8191520442889919, 0.573576436351046, 0));
|
||||
#137 = VECTOR('NONE', #136, 1);
|
||||
#138 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0));
|
||||
#139 = LINE('NONE', #138, #137);
|
||||
#140 = DIRECTION('NONE', (0, 0, 1));
|
||||
#141 = VECTOR('NONE', #140, 1);
|
||||
#142 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0));
|
||||
#143 = LINE('NONE', #142, #141);
|
||||
#144 = DIRECTION('NONE', (-0.8191520442889919, 0.573576436351046, 0));
|
||||
#145 = VECTOR('NONE', #144, 1);
|
||||
#146 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, 2.58064));
|
||||
#147 = LINE('NONE', #146, #145);
|
||||
#148 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0));
|
||||
#149 = VECTOR('NONE', #148, 1);
|
||||
#150 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0));
|
||||
#151 = LINE('NONE', #150, #149);
|
||||
#152 = DIRECTION('NONE', (0, 0, 1));
|
||||
#153 = VECTOR('NONE', #152, 1);
|
||||
#154 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0));
|
||||
#155 = LINE('NONE', #154, #153);
|
||||
#156 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0));
|
||||
#157 = VECTOR('NONE', #156, 1);
|
||||
#158 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064));
|
||||
#159 = LINE('NONE', #158, #157);
|
||||
#160 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0));
|
||||
#161 = VECTOR('NONE', #160, 1);
|
||||
#162 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0));
|
||||
#163 = LINE('NONE', #162, #161);
|
||||
#164 = DIRECTION('NONE', (0, 0, 1));
|
||||
#165 = VECTOR('NONE', #164, 1);
|
||||
#166 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0));
|
||||
#167 = LINE('NONE', #166, #165);
|
||||
#168 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0));
|
||||
#169 = VECTOR('NONE', #168, 1);
|
||||
#170 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, 2.58064));
|
||||
#171 = LINE('NONE', #170, #169);
|
||||
#172 = DIRECTION('NONE', (0, 1, 0));
|
||||
#173 = VECTOR('NONE', #172, 1);
|
||||
#174 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0));
|
||||
#175 = LINE('NONE', #174, #173);
|
||||
#176 = DIRECTION('NONE', (0, 0, 1));
|
||||
#177 = VECTOR('NONE', #176, 1);
|
||||
#178 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0));
|
||||
#179 = LINE('NONE', #178, #177);
|
||||
#180 = DIRECTION('NONE', (0, 1, 0));
|
||||
#181 = VECTOR('NONE', #180, 1);
|
||||
#182 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, 2.58064));
|
||||
#183 = LINE('NONE', #182, #181);
|
||||
#184 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#185 = VECTOR('NONE', #184, 1);
|
||||
#186 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0));
|
||||
#187 = LINE('NONE', #186, #185);
|
||||
#188 = DIRECTION('NONE', (0, 0, 1));
|
||||
#189 = VECTOR('NONE', #188, 1);
|
||||
#190 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0));
|
||||
#191 = LINE('NONE', #190, #189);
|
||||
#192 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#193 = VECTOR('NONE', #192, 1);
|
||||
#194 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, 2.58064));
|
||||
#195 = LINE('NONE', #194, #193);
|
||||
#196 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0));
|
||||
#197 = VECTOR('NONE', #196, 1);
|
||||
#198 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0));
|
||||
#199 = LINE('NONE', #198, #197);
|
||||
#200 = DIRECTION('NONE', (0, 0, 1));
|
||||
#201 = VECTOR('NONE', #200, 1);
|
||||
#202 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0));
|
||||
#203 = LINE('NONE', #202, #201);
|
||||
#204 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0));
|
||||
#205 = VECTOR('NONE', #204, 1);
|
||||
#206 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, 2.58064));
|
||||
#207 = LINE('NONE', #206, #205);
|
||||
#208 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#209 = VECTOR('NONE', #208, 1);
|
||||
#210 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0));
|
||||
#211 = LINE('NONE', #210, #209);
|
||||
#212 = DIRECTION('NONE', (0, 0, 1));
|
||||
#213 = VECTOR('NONE', #212, 1);
|
||||
#214 = CARTESIAN_POINT('NONE', (0, 0.64516, -0));
|
||||
#215 = LINE('NONE', #214, #213);
|
||||
#216 = DIRECTION('NONE', (-1, 0, 0));
|
||||
#217 = VECTOR('NONE', #216, 1);
|
||||
#218 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, 2.58064));
|
||||
#219 = LINE('NONE', #218, #217);
|
||||
#220 = DIRECTION('NONE', (0, -1, 0));
|
||||
#221 = VECTOR('NONE', #220, 1);
|
||||
#222 = CARTESIAN_POINT('NONE', (0, 0.64516, -0));
|
||||
#223 = LINE('NONE', #222, #221);
|
||||
#224 = DIRECTION('NONE', (0, -1, 0));
|
||||
#225 = VECTOR('NONE', #224, 1);
|
||||
#226 = CARTESIAN_POINT('NONE', (0, 0.64516, 2.58064));
|
||||
#227 = LINE('NONE', #226, #225);
|
||||
#228 = EDGE_CURVE('NONE', #5, #7, #63, .T.);
|
||||
#229 = EDGE_CURVE('NONE', #7, #9, #67, .T.);
|
||||
#230 = EDGE_CURVE('NONE', #11, #9, #71, .T.);
|
||||
#231 = EDGE_CURVE('NONE', #5, #11, #75, .T.);
|
||||
#232 = EDGE_CURVE('NONE', #7, #13, #79, .T.);
|
||||
#233 = EDGE_CURVE('NONE', #13, #15, #83, .T.);
|
||||
#234 = EDGE_CURVE('NONE', #9, #15, #87, .T.);
|
||||
#235 = EDGE_CURVE('NONE', #13, #17, #91, .T.);
|
||||
#236 = EDGE_CURVE('NONE', #17, #19, #95, .T.);
|
||||
#237 = EDGE_CURVE('NONE', #15, #19, #99, .T.);
|
||||
#238 = EDGE_CURVE('NONE', #17, #21, #103, .T.);
|
||||
#239 = EDGE_CURVE('NONE', #21, #23, #107, .T.);
|
||||
#240 = EDGE_CURVE('NONE', #19, #23, #111, .T.);
|
||||
#241 = EDGE_CURVE('NONE', #21, #25, #115, .T.);
|
||||
#242 = EDGE_CURVE('NONE', #25, #27, #119, .T.);
|
||||
#243 = EDGE_CURVE('NONE', #23, #27, #123, .T.);
|
||||
#244 = EDGE_CURVE('NONE', #25, #29, #127, .T.);
|
||||
#245 = EDGE_CURVE('NONE', #29, #31, #131, .T.);
|
||||
#246 = EDGE_CURVE('NONE', #27, #31, #135, .T.);
|
||||
#247 = EDGE_CURVE('NONE', #29, #33, #139, .T.);
|
||||
#248 = EDGE_CURVE('NONE', #33, #35, #143, .T.);
|
||||
#249 = EDGE_CURVE('NONE', #31, #35, #147, .T.);
|
||||
#250 = EDGE_CURVE('NONE', #33, #37, #151, .T.);
|
||||
#251 = EDGE_CURVE('NONE', #37, #39, #155, .T.);
|
||||
#252 = EDGE_CURVE('NONE', #35, #39, #159, .T.);
|
||||
#253 = EDGE_CURVE('NONE', #37, #41, #163, .T.);
|
||||
#254 = EDGE_CURVE('NONE', #41, #43, #167, .T.);
|
||||
#255 = EDGE_CURVE('NONE', #39, #43, #171, .T.);
|
||||
#256 = EDGE_CURVE('NONE', #41, #45, #175, .T.);
|
||||
#257 = EDGE_CURVE('NONE', #45, #47, #179, .T.);
|
||||
#258 = EDGE_CURVE('NONE', #43, #47, #183, .T.);
|
||||
#259 = EDGE_CURVE('NONE', #45, #49, #187, .T.);
|
||||
#260 = EDGE_CURVE('NONE', #49, #51, #191, .T.);
|
||||
#261 = EDGE_CURVE('NONE', #47, #51, #195, .T.);
|
||||
#262 = EDGE_CURVE('NONE', #49, #53, #199, .T.);
|
||||
#263 = EDGE_CURVE('NONE', #53, #55, #203, .T.);
|
||||
#264 = EDGE_CURVE('NONE', #51, #55, #207, .T.);
|
||||
#265 = EDGE_CURVE('NONE', #53, #57, #211, .T.);
|
||||
#266 = EDGE_CURVE('NONE', #57, #59, #215, .T.);
|
||||
#267 = EDGE_CURVE('NONE', #55, #59, #219, .T.);
|
||||
#268 = EDGE_CURVE('NONE', #57, #5, #223, .T.);
|
||||
#269 = EDGE_CURVE('NONE', #59, #11, #227, .T.);
|
||||
#270 = ORIENTED_EDGE('NONE', *, *, #228, .T.);
|
||||
#271 = ORIENTED_EDGE('NONE', *, *, #229, .T.);
|
||||
#272 = ORIENTED_EDGE('NONE', *, *, #230, .F.);
|
||||
#273 = ORIENTED_EDGE('NONE', *, *, #231, .F.);
|
||||
#274 = EDGE_LOOP('NONE', (#270, #271, #272, #273));
|
||||
#275 = ORIENTED_EDGE('NONE', *, *, #232, .T.);
|
||||
#276 = ORIENTED_EDGE('NONE', *, *, #233, .T.);
|
||||
#277 = ORIENTED_EDGE('NONE', *, *, #234, .F.);
|
||||
#278 = ORIENTED_EDGE('NONE', *, *, #229, .F.);
|
||||
#279 = EDGE_LOOP('NONE', (#275, #276, #277, #278));
|
||||
#280 = ORIENTED_EDGE('NONE', *, *, #235, .T.);
|
||||
#281 = ORIENTED_EDGE('NONE', *, *, #236, .T.);
|
||||
#282 = ORIENTED_EDGE('NONE', *, *, #237, .F.);
|
||||
#283 = ORIENTED_EDGE('NONE', *, *, #233, .F.);
|
||||
#284 = EDGE_LOOP('NONE', (#280, #281, #282, #283));
|
||||
#285 = ORIENTED_EDGE('NONE', *, *, #238, .T.);
|
||||
#286 = ORIENTED_EDGE('NONE', *, *, #239, .T.);
|
||||
#287 = ORIENTED_EDGE('NONE', *, *, #240, .F.);
|
||||
#288 = ORIENTED_EDGE('NONE', *, *, #236, .F.);
|
||||
#289 = EDGE_LOOP('NONE', (#285, #286, #287, #288));
|
||||
#290 = ORIENTED_EDGE('NONE', *, *, #241, .T.);
|
||||
#291 = ORIENTED_EDGE('NONE', *, *, #242, .T.);
|
||||
#292 = ORIENTED_EDGE('NONE', *, *, #243, .F.);
|
||||
#293 = ORIENTED_EDGE('NONE', *, *, #239, .F.);
|
||||
#294 = EDGE_LOOP('NONE', (#290, #291, #292, #293));
|
||||
#295 = ORIENTED_EDGE('NONE', *, *, #244, .T.);
|
||||
#296 = ORIENTED_EDGE('NONE', *, *, #245, .T.);
|
||||
#297 = ORIENTED_EDGE('NONE', *, *, #246, .F.);
|
||||
#298 = ORIENTED_EDGE('NONE', *, *, #242, .F.);
|
||||
#299 = EDGE_LOOP('NONE', (#295, #296, #297, #298));
|
||||
#300 = ORIENTED_EDGE('NONE', *, *, #247, .T.);
|
||||
#301 = ORIENTED_EDGE('NONE', *, *, #248, .T.);
|
||||
#302 = ORIENTED_EDGE('NONE', *, *, #249, .F.);
|
||||
#303 = ORIENTED_EDGE('NONE', *, *, #245, .F.);
|
||||
#304 = EDGE_LOOP('NONE', (#300, #301, #302, #303));
|
||||
#305 = ORIENTED_EDGE('NONE', *, *, #250, .T.);
|
||||
#306 = ORIENTED_EDGE('NONE', *, *, #251, .T.);
|
||||
#307 = ORIENTED_EDGE('NONE', *, *, #252, .F.);
|
||||
#308 = ORIENTED_EDGE('NONE', *, *, #248, .F.);
|
||||
#309 = EDGE_LOOP('NONE', (#305, #306, #307, #308));
|
||||
#310 = ORIENTED_EDGE('NONE', *, *, #253, .T.);
|
||||
#311 = ORIENTED_EDGE('NONE', *, *, #254, .T.);
|
||||
#312 = ORIENTED_EDGE('NONE', *, *, #255, .F.);
|
||||
#313 = ORIENTED_EDGE('NONE', *, *, #251, .F.);
|
||||
#314 = EDGE_LOOP('NONE', (#310, #311, #312, #313));
|
||||
#315 = ORIENTED_EDGE('NONE', *, *, #256, .T.);
|
||||
#316 = ORIENTED_EDGE('NONE', *, *, #257, .T.);
|
||||
#317 = ORIENTED_EDGE('NONE', *, *, #258, .F.);
|
||||
#318 = ORIENTED_EDGE('NONE', *, *, #254, .F.);
|
||||
#319 = EDGE_LOOP('NONE', (#315, #316, #317, #318));
|
||||
#320 = ORIENTED_EDGE('NONE', *, *, #259, .T.);
|
||||
#321 = ORIENTED_EDGE('NONE', *, *, #260, .T.);
|
||||
#322 = ORIENTED_EDGE('NONE', *, *, #261, .F.);
|
||||
#323 = ORIENTED_EDGE('NONE', *, *, #257, .F.);
|
||||
#324 = EDGE_LOOP('NONE', (#320, #321, #322, #323));
|
||||
#325 = ORIENTED_EDGE('NONE', *, *, #262, .T.);
|
||||
#326 = ORIENTED_EDGE('NONE', *, *, #263, .T.);
|
||||
#327 = ORIENTED_EDGE('NONE', *, *, #264, .F.);
|
||||
#328 = ORIENTED_EDGE('NONE', *, *, #260, .F.);
|
||||
#329 = EDGE_LOOP('NONE', (#325, #326, #327, #328));
|
||||
#330 = ORIENTED_EDGE('NONE', *, *, #265, .T.);
|
||||
#331 = ORIENTED_EDGE('NONE', *, *, #266, .T.);
|
||||
#332 = ORIENTED_EDGE('NONE', *, *, #267, .F.);
|
||||
#333 = ORIENTED_EDGE('NONE', *, *, #263, .F.);
|
||||
#334 = EDGE_LOOP('NONE', (#330, #331, #332, #333));
|
||||
#335 = ORIENTED_EDGE('NONE', *, *, #268, .T.);
|
||||
#336 = ORIENTED_EDGE('NONE', *, *, #231, .T.);
|
||||
#337 = ORIENTED_EDGE('NONE', *, *, #269, .F.);
|
||||
#338 = ORIENTED_EDGE('NONE', *, *, #266, .F.);
|
||||
#339 = EDGE_LOOP('NONE', (#335, #336, #337, #338));
|
||||
#340 = ORIENTED_EDGE('NONE', *, *, #228, .T.);
|
||||
#341 = ORIENTED_EDGE('NONE', *, *, #232, .T.);
|
||||
#342 = ORIENTED_EDGE('NONE', *, *, #235, .T.);
|
||||
#343 = ORIENTED_EDGE('NONE', *, *, #238, .T.);
|
||||
#344 = ORIENTED_EDGE('NONE', *, *, #241, .T.);
|
||||
#345 = ORIENTED_EDGE('NONE', *, *, #244, .T.);
|
||||
#346 = ORIENTED_EDGE('NONE', *, *, #247, .T.);
|
||||
#347 = ORIENTED_EDGE('NONE', *, *, #250, .T.);
|
||||
#348 = ORIENTED_EDGE('NONE', *, *, #253, .T.);
|
||||
#349 = ORIENTED_EDGE('NONE', *, *, #256, .T.);
|
||||
#350 = ORIENTED_EDGE('NONE', *, *, #259, .T.);
|
||||
#351 = ORIENTED_EDGE('NONE', *, *, #262, .T.);
|
||||
#352 = ORIENTED_EDGE('NONE', *, *, #265, .T.);
|
||||
#353 = ORIENTED_EDGE('NONE', *, *, #268, .T.);
|
||||
#354 = EDGE_LOOP('NONE', (#340, #341, #342, #343, #344, #345, #346, #347, #348, #349, #350, #351, #352, #353));
|
||||
#355 = ORIENTED_EDGE('NONE', *, *, #230, .T.);
|
||||
#356 = ORIENTED_EDGE('NONE', *, *, #234, .T.);
|
||||
#357 = ORIENTED_EDGE('NONE', *, *, #237, .T.);
|
||||
#358 = ORIENTED_EDGE('NONE', *, *, #240, .T.);
|
||||
#359 = ORIENTED_EDGE('NONE', *, *, #243, .T.);
|
||||
#360 = ORIENTED_EDGE('NONE', *, *, #246, .T.);
|
||||
#361 = ORIENTED_EDGE('NONE', *, *, #249, .T.);
|
||||
#362 = ORIENTED_EDGE('NONE', *, *, #252, .T.);
|
||||
#363 = ORIENTED_EDGE('NONE', *, *, #255, .T.);
|
||||
#364 = ORIENTED_EDGE('NONE', *, *, #258, .T.);
|
||||
#365 = ORIENTED_EDGE('NONE', *, *, #261, .T.);
|
||||
#366 = ORIENTED_EDGE('NONE', *, *, #264, .T.);
|
||||
#367 = ORIENTED_EDGE('NONE', *, *, #267, .T.);
|
||||
#368 = ORIENTED_EDGE('NONE', *, *, #269, .T.);
|
||||
#369 = EDGE_LOOP('NONE', (#355, #356, #357, #358, #359, #360, #361, #362, #363, #364, #365, #366, #367, #368));
|
||||
#370 = CARTESIAN_POINT('NONE', (0, -0.3225799999999985, 1.2903199999999995));
|
||||
#371 = DIRECTION('NONE', (-1, -0, 0));
|
||||
#372 = AXIS2_PLACEMENT_3D('NONE', #370, #371, $);
|
||||
#373 = PLANE('NONE', #372);
|
||||
#374 = CARTESIAN_POINT('NONE', (0.9983910612778368, -0.6451599999999998, 1.2903199999999997));
|
||||
#375 = DIRECTION('NONE', (0, -1, 0));
|
||||
#376 = AXIS2_PLACEMENT_3D('NONE', #374, #375, $);
|
||||
#377 = PLANE('NONE', #376);
|
||||
#378 = CARTESIAN_POINT('NONE', (2.918166090585415, -1.2903199999999988, 1.2903199999999997));
|
||||
#379 = DIRECTION('NONE', (-0.5735764363510459, -0.8191520442889919, 0));
|
||||
#380 = AXIS2_PLACEMENT_3D('NONE', #378, #379, $);
|
||||
#381 = PLANE('NONE', #380);
|
||||
#382 = CARTESIAN_POINT('NONE', (4.984285029307579, -1.9354799999999992, 1.2903199999999997));
|
||||
#383 = DIRECTION('NONE', (0, -1, 0));
|
||||
#384 = AXIS2_PLACEMENT_3D('NONE', #382, #383, $);
|
||||
#385 = PLANE('NONE', #384);
|
||||
#386 = CARTESIAN_POINT('NONE', (6.129019999999999, -1.7741899999999997, 1.2903199999999997));
|
||||
#387 = DIRECTION('NONE', (1, -0, 0));
|
||||
#388 = AXIS2_PLACEMENT_3D('NONE', #386, #387, $);
|
||||
#389 = PLANE('NONE', #388);
|
||||
#390 = CARTESIAN_POINT('NONE', (5.035139570965871, -1.6128999999999998, 1.2903199999999997));
|
||||
#391 = DIRECTION('NONE', (0, 1, -0));
|
||||
#392 = AXIS2_PLACEMENT_3D('NONE', #390, #391, $);
|
||||
#393 = PLANE('NONE', #392);
|
||||
#394 = CARTESIAN_POINT('NONE', (2.7895291818945633, -0.8064499999999998, 1.2903199999999995));
|
||||
#395 = DIRECTION('NONE', (0.5735764363510459, 0.8191520442889918, -0));
|
||||
#396 = AXIS2_PLACEMENT_3D('NONE', #394, #395, $);
|
||||
#397 = PLANE('NONE', #396);
|
||||
#398 = CARTESIAN_POINT('NONE', (2.6754617854843468, 0.4838700000000003, 1.2903199999999997));
|
||||
#399 = DIRECTION('NONE', (0.4226182617406992, -0.90630778703665, 0));
|
||||
#400 = AXIS2_PLACEMENT_3D('NONE', #398, #399, $);
|
||||
#401 = PLANE('NONE', #400);
|
||||
#402 = CARTESIAN_POINT('NONE', (4.921072174555653, 0.9677399999999998, 1.2903199999999995));
|
||||
#403 = DIRECTION('NONE', (0, -1, 0));
|
||||
#404 = AXIS2_PLACEMENT_3D('NONE', #402, #403, $);
|
||||
#405 = PLANE('NONE', #404);
|
||||
#406 = CARTESIAN_POINT('NONE', (6.129019999999998, 1.1290299999999989, 1.2903199999999995));
|
||||
#407 = DIRECTION('NONE', (1, -0, 0));
|
||||
#408 = AXIS2_PLACEMENT_3D('NONE', #406, #407, $);
|
||||
#409 = PLANE('NONE', #408);
|
||||
#410 = CARTESIAN_POINT('NONE', (4.8853150424179725, 1.2903199999999997, 1.2903199999999997));
|
||||
#411 = DIRECTION('NONE', (0, 1, -0));
|
||||
#412 = AXIS2_PLACEMENT_3D('NONE', #410, #411, $);
|
||||
#413 = PLANE('NONE', #412);
|
||||
#414 = CARTESIAN_POINT('NONE', (2.9498350424179733, 0.9677399999999998, 1.2903199999999997));
|
||||
#415 = DIRECTION('NONE', (-0.42261826174069933, 0.9063077870366499, -0));
|
||||
#416 = AXIS2_PLACEMENT_3D('NONE', #414, #415, $);
|
||||
#417 = PLANE('NONE', #416);
|
||||
#418 = CARTESIAN_POINT('NONE', (1.1290299999999998, 0.6451599999999998, 1.29032));
|
||||
#419 = DIRECTION('NONE', (0, 1, -0));
|
||||
#420 = AXIS2_PLACEMENT_3D('NONE', #418, #419, $);
|
||||
#421 = PLANE('NONE', #420);
|
||||
#422 = CARTESIAN_POINT('NONE', (0, 0.32257999999999987, 1.2903199999999995));
|
||||
#423 = DIRECTION('NONE', (-1, -0, 0));
|
||||
#424 = AXIS2_PLACEMENT_3D('NONE', #422, #423, $);
|
||||
#425 = PLANE('NONE', #424);
|
||||
#426 = CARTESIAN_POINT('NONE', (0, 0, -0));
|
||||
#427 = DIRECTION('NONE', (0, 0, 1));
|
||||
#428 = AXIS2_PLACEMENT_3D('NONE', #426, #427, $);
|
||||
#429 = PLANE('NONE', #428);
|
||||
#430 = CARTESIAN_POINT('NONE', (0, 0, 2.58064));
|
||||
#431 = DIRECTION('NONE', (0, 0, 1));
|
||||
#432 = AXIS2_PLACEMENT_3D('NONE', #430, #431, $);
|
||||
#433 = PLANE('NONE', #432);
|
||||
#434 = FACE_OUTER_BOUND('NONE', #274, .T.);
|
||||
#435 = ADVANCED_FACE('NONE', (#434), #373, .T.);
|
||||
#436 = FACE_OUTER_BOUND('NONE', #279, .T.);
|
||||
#437 = ADVANCED_FACE('NONE', (#436), #377, .T.);
|
||||
#438 = FACE_OUTER_BOUND('NONE', #284, .T.);
|
||||
#439 = ADVANCED_FACE('NONE', (#438), #381, .T.);
|
||||
#440 = FACE_OUTER_BOUND('NONE', #289, .T.);
|
||||
#441 = ADVANCED_FACE('NONE', (#440), #385, .T.);
|
||||
#442 = FACE_OUTER_BOUND('NONE', #294, .T.);
|
||||
#443 = ADVANCED_FACE('NONE', (#442), #389, .T.);
|
||||
#444 = FACE_OUTER_BOUND('NONE', #299, .T.);
|
||||
#445 = ADVANCED_FACE('NONE', (#444), #393, .T.);
|
||||
#446 = FACE_OUTER_BOUND('NONE', #304, .T.);
|
||||
#447 = ADVANCED_FACE('NONE', (#446), #397, .T.);
|
||||
#448 = FACE_OUTER_BOUND('NONE', #309, .T.);
|
||||
#449 = ADVANCED_FACE('NONE', (#448), #401, .T.);
|
||||
#450 = FACE_OUTER_BOUND('NONE', #314, .T.);
|
||||
#451 = ADVANCED_FACE('NONE', (#450), #405, .T.);
|
||||
#452 = FACE_OUTER_BOUND('NONE', #319, .T.);
|
||||
#453 = ADVANCED_FACE('NONE', (#452), #409, .T.);
|
||||
#454 = FACE_OUTER_BOUND('NONE', #324, .T.);
|
||||
#455 = ADVANCED_FACE('NONE', (#454), #413, .T.);
|
||||
#456 = FACE_OUTER_BOUND('NONE', #329, .T.);
|
||||
#457 = ADVANCED_FACE('NONE', (#456), #417, .T.);
|
||||
#458 = FACE_OUTER_BOUND('NONE', #334, .T.);
|
||||
#459 = ADVANCED_FACE('NONE', (#458), #421, .T.);
|
||||
#460 = FACE_OUTER_BOUND('NONE', #339, .T.);
|
||||
#461 = ADVANCED_FACE('NONE', (#460), #425, .T.);
|
||||
#462 = FACE_OUTER_BOUND('NONE', #354, .F.);
|
||||
#463 = ADVANCED_FACE('NONE', (#462), #429, .F.);
|
||||
#464 = FACE_OUTER_BOUND('NONE', #369, .T.);
|
||||
#465 = ADVANCED_FACE('NONE', (#464), #433, .T.);
|
||||
#466 = CLOSED_SHELL('NONE', (#435, #437, #439, #441, #443, #445, #447, #449, #451, #453, #455, #457, #459, #461, #463, #465));
|
||||
#467 = ORIENTED_CLOSED_SHELL('NONE', *, #466, .T.);
|
||||
#468 = MANIFOLD_SOLID_BREP('NONE', #467);
|
||||
#469 = APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies');
|
||||
#470 = PRODUCT_DEFINITION_CONTEXT('part definition', #469, 'design');
|
||||
#471 = PRODUCT('UNIDENTIFIED_PRODUCT', 'NONE', $, ());
|
||||
#472 = PRODUCT_DEFINITION_FORMATION('', $, #471);
|
||||
#473 = PRODUCT_DEFINITION('design', $, #472, #470);
|
||||
#474 = PRODUCT_DEFINITION_SHAPE('NONE', $, #473);
|
||||
#475 = ADVANCED_BREP_SHAPE_REPRESENTATION('NONE', (#468), #3);
|
||||
#476 = SHAPE_DEFINITION_REPRESENTATION(#474, #475);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 163 KiB |
@ -1,478 +0,0 @@
|
||||
solid unnamed
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 0
|
||||
vertex 0 -0 0
|
||||
vertex 0 -101.600006 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 -25.400002
|
||||
vertex 0 -0 0
|
||||
vertex 0 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 0 -101.600006 -25.400002
|
||||
vertex 0 -0 -25.400002
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
vertex 0 -0 -25.400002
|
||||
vertex 78.613464 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0.5735764 0 -0.8191522
|
||||
outer loop
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
vertex 78.613464 -0 -25.400002
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0.5735764 0 -0.8191522
|
||||
outer loop
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
vertex 78.613464 -0 -25.400002
|
||||
vertex 151.16339 -0 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
vertex 151.16339 -0 -76.2
|
||||
vertex 241.3 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 -76.2
|
||||
vertex 151.16339 -0 -76.2
|
||||
vertex 241.3 -0 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 0 0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 -76.2
|
||||
vertex 241.3 -0 -76.2
|
||||
vertex 241.3 -101.600006 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 -0 0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 -63.5
|
||||
vertex 241.3 -0 -76.2
|
||||
vertex 241.3 -0 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -0 1
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 -63.5
|
||||
vertex 241.3 -0 -63.5
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 1
|
||||
outer loop
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
vertex 241.3 -0 -63.5
|
||||
vertex 155.16768 -0 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.5735765 0 0.81915194
|
||||
outer loop
|
||||
vertex 87.15214 -101.600006 -15.875
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
vertex 109.82398 -0 -31.75
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.57357645 0 0.819152
|
||||
outer loop
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
vertex 155.16768 -0 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.57357645 0 0.81915206
|
||||
outer loop
|
||||
vertex 87.15214 -0 -15.875
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 87.15214 -101.600006 -15.875
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.5735765 0 0.81915194
|
||||
outer loop
|
||||
vertex 109.82398 -0 -31.75
|
||||
vertex 87.15214 -0 -15.875
|
||||
vertex 87.15214 -101.600006 -15.875
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.57357645 -0 0.819152
|
||||
outer loop
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
vertex 155.16768 -0 -63.5
|
||||
vertex 109.82398 -0 -31.75
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.57357645 -0 0.81915206
|
||||
outer loop
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 87.15214 -0 -15.875
|
||||
vertex 64.480286 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.4226182 0 -0.9063078
|
||||
outer loop
|
||||
vertex 84.906715 -101.600006 9.525
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 64.480286 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.42261833 0 -0.90630776
|
||||
outer loop
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
vertex 84.906715 -101.600006 9.525
|
||||
vertex 84.906715 -0 9.525
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.4226182 0 -0.9063078
|
||||
outer loop
|
||||
vertex 84.906715 -0 9.525
|
||||
vertex 84.906715 -101.600006 9.525
|
||||
vertex 64.480286 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.4226183 0 -0.9063078
|
||||
outer loop
|
||||
vertex 105.33314 -0 19.05
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.42261833 0 -0.90630776
|
||||
outer loop
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
vertex 84.906715 -0 9.525
|
||||
vertex 105.33314 -0 19.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0.4226183 0 -0.9063078
|
||||
outer loop
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 105.33314 -0 19.05
|
||||
vertex 146.18599 -0 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 146.18599 -0 38.1
|
||||
vertex 241.3 -101.600006 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 -1
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 38.1
|
||||
vertex 146.18599 -0 38.1
|
||||
vertex 241.3 -0 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 0 0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 38.1
|
||||
vertex 241.3 -0 38.1
|
||||
vertex 241.3 -101.600006 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 1 -0 0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 50.800003
|
||||
vertex 241.3 -0 38.1
|
||||
vertex 241.3 -0 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -0 0.99999994
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 50.800003
|
||||
vertex 241.3 -0 50.800003
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 0.99999994
|
||||
outer loop
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
vertex 241.3 -0 50.800003
|
||||
vertex 143.37048 -0 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0.42261827 0 0.9063078
|
||||
outer loop
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
vertex 143.37048 -0 50.800003
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0.42261827 0 0.9063078
|
||||
outer loop
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
vertex 143.37048 -0 50.800003
|
||||
vertex 88.9 -0 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -0 1
|
||||
outer loop
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
vertex 88.9 -0 25.400002
|
||||
vertex 0 -101.600006 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0 1
|
||||
outer loop
|
||||
vertex 0 -101.600006 25.400002
|
||||
vertex 88.9 -0 25.400002
|
||||
vertex 0 -0 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 25.400002
|
||||
vertex 0 -0 25.400002
|
||||
vertex 0 -101.600006 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 0
|
||||
vertex 0 -0 25.400002
|
||||
vertex 0 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 -0
|
||||
outer loop
|
||||
vertex 84.906715 -0 9.525
|
||||
vertex 64.480286 -0 0
|
||||
vertex 88.9 -0 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 105.33314 -0 19.05
|
||||
vertex 84.906715 -0 9.525
|
||||
vertex 88.9 -0 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 87.15214 -0 -15.875
|
||||
vertex 109.82398 -0 -31.75
|
||||
vertex 78.613464 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 105.33314 -0 19.05
|
||||
vertex 143.37048 -0 50.800003
|
||||
vertex 146.18599 -0 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 1 0
|
||||
outer loop
|
||||
vertex 0 -0 25.400002
|
||||
vertex 88.9 -0 25.400002
|
||||
vertex 64.480286 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 0 -0 25.400002
|
||||
vertex 64.480286 -0 0
|
||||
vertex 0 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 1 0
|
||||
outer loop
|
||||
vertex 143.37048 -0 50.800003
|
||||
vertex 241.3 -0 50.800003
|
||||
vertex 146.18599 -0 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 241.3 -0 50.800003
|
||||
vertex 241.3 -0 38.1
|
||||
vertex 146.18599 -0 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 -0
|
||||
outer loop
|
||||
vertex 105.33314 -0 19.05
|
||||
vertex 88.9 -0 25.400002
|
||||
vertex 143.37048 -0 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 0.99999994 0
|
||||
outer loop
|
||||
vertex 64.480286 -0 0
|
||||
vertex 87.15214 -0 -15.875
|
||||
vertex 78.613464 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 109.82398 -0 -31.75
|
||||
vertex 151.16339 -0 -76.2
|
||||
vertex 78.613464 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 155.16768 -0 -63.5
|
||||
vertex 151.16339 -0 -76.2
|
||||
vertex 109.82398 -0 -31.75
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 241.3 -0 -63.5
|
||||
vertex 241.3 -0 -76.2
|
||||
vertex 155.16768 -0 -63.5
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 155.16768 -0 -63.5
|
||||
vertex 241.3 -0 -76.2
|
||||
vertex 151.16339 -0 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 64.480286 -0 0
|
||||
vertex 78.613464 -0 -25.400002
|
||||
vertex 0 -0 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 1 0
|
||||
outer loop
|
||||
vertex 0 -0 -25.400002
|
||||
vertex 0 -0 0
|
||||
vertex 64.480286 -0 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 -1 0
|
||||
outer loop
|
||||
vertex 84.906715 -101.600006 9.525
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
vertex 64.480286 -101.600006 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 -1 0
|
||||
outer loop
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
vertex 84.906715 -101.600006 9.525
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 -0
|
||||
outer loop
|
||||
vertex 87.15214 -101.600006 -15.875
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 25.400002
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 25.400002
|
||||
vertex 0 -101.600006 0
|
||||
vertex 64.480286 -101.600006 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 241.3 -101.600006 50.800003
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 -0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 50.800003
|
||||
vertex 146.18599 -101.600006 38.1
|
||||
vertex 241.3 -101.600006 38.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 105.33314 -101.600006 19.05
|
||||
vertex 143.37048 -101.600006 50.800003
|
||||
vertex 88.9 -101.600006 25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -0.99999994 0
|
||||
outer loop
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
vertex 87.15214 -101.600006 -15.875
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 -1 -0
|
||||
outer loop
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 -1 0
|
||||
outer loop
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
vertex 109.82398 -101.600006 -31.75
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -0 -1 -0
|
||||
outer loop
|
||||
vertex 241.3 -101.600006 -63.5
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
vertex 241.3 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 -0
|
||||
outer loop
|
||||
vertex 155.16768 -101.600006 -63.5
|
||||
vertex 151.16339 -101.600006 -76.2
|
||||
vertex 241.3 -101.600006 -76.2
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 -0
|
||||
outer loop
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 0 -101.600006 -25.400002
|
||||
vertex 78.613464 -101.600006 -25.400002
|
||||
endloop
|
||||
endfacet
|
||||
facet normal 0 -1 0
|
||||
outer loop
|
||||
vertex 0 -101.600006 -25.400002
|
||||
vertex 64.480286 -101.600006 0
|
||||
vertex 0 -101.600006 0
|
||||
endloop
|
||||
endfacet
|
||||
endsolid unnamed
|
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 163 KiB |
@ -3,6 +3,7 @@ import { secrets } from './secrets'
|
||||
import { getUtils } from './test-utils'
|
||||
import waitOn from 'wait-on'
|
||||
import { Themes } from '../../src/lib/theme'
|
||||
import { initialSettings } from '../../src/lib/settings/initialSettings'
|
||||
import { roundOff } from 'lib/utils'
|
||||
|
||||
/*
|
||||
@ -19,6 +20,8 @@ const commonPoints = {
|
||||
startAt: '[9.06, -12.22]',
|
||||
num1: 9.14,
|
||||
num2: 18.2,
|
||||
// num1: 9.64,
|
||||
// num2: 19.19,
|
||||
}
|
||||
|
||||
test.beforeEach(async ({ context, page }) => {
|
||||
@ -75,6 +78,7 @@ test('Basic sketch', async ({ page }) => {
|
||||
await expect(page.locator('.cm-content')).toHaveText(
|
||||
`const part001 = startSketchOn('-XZ')`
|
||||
)
|
||||
await u.closeDebugPanel()
|
||||
|
||||
await page.waitForTimeout(300) // TODO detect animation ending, or disable animation
|
||||
|
||||
@ -85,7 +89,6 @@ test('Basic sketch', async ({ page }) => {
|
||||
|> startProfileAt(${commonPoints.startAt}, %)`)
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
await u.closeDebugPanel()
|
||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
@ -129,11 +132,131 @@ test('Basic sketch', async ({ page }) => {
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toHaveText(`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt(${commonPoints.startAt}, %)
|
||||
|> line({ to: [${commonPoints.num1}, 0], tag: 'seg01' }, %)
|
||||
|> line([${commonPoints.num1}, 0], %, 'seg01')
|
||||
|> line([0, ${commonPoints.num1}], %)
|
||||
|> angledLine([180, segLen('seg01', %)], %)`)
|
||||
})
|
||||
|
||||
test('Can moving camera', async ({ page, context }) => {
|
||||
test.skip(process.platform === 'darwin', 'Can moving camera')
|
||||
const u = getUtils(page)
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await u.openAndClearDebugPanel()
|
||||
|
||||
const camPos: [number, number, number] = [0, 85, 85]
|
||||
const bakeInRetries = async (
|
||||
mouseActions: any,
|
||||
xyz: [number, number, number],
|
||||
cnt = 0
|
||||
) => {
|
||||
// hack that we're implemented our own retry instead of using retries built into playwright.
|
||||
// however each of these camera drags can be flaky, because of udp
|
||||
// and so putting them together means only one needs to fail to make this test extra flaky.
|
||||
// this way we can retry within the test
|
||||
// We could break them out into separate tests, but the longest past of the test is waiting
|
||||
// for the stream to start, so it can be good to bundle related things together.
|
||||
|
||||
await u.updateCamPosition(camPos)
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
// rotate
|
||||
await u.closeDebugPanel()
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
await page.waitForTimeout(100)
|
||||
// const yo = page.getByTestId('cam-x-position').inputValue()
|
||||
|
||||
await u.doAndWaitForImageDiff(async () => {
|
||||
await mouseActions()
|
||||
|
||||
await u.openAndClearDebugPanel()
|
||||
|
||||
await u.closeDebugPanel()
|
||||
await page.waitForTimeout(100)
|
||||
}, 300)
|
||||
|
||||
await u.openAndClearDebugPanel()
|
||||
const vals = await Promise.all([
|
||||
page.getByTestId('cam-x-position').inputValue(),
|
||||
page.getByTestId('cam-y-position').inputValue(),
|
||||
page.getByTestId('cam-z-position').inputValue(),
|
||||
])
|
||||
const xError = Math.abs(Number(vals[0]) + xyz[0])
|
||||
const yError = Math.abs(Number(vals[1]) + xyz[1])
|
||||
const zError = Math.abs(Number(vals[2]) + xyz[2])
|
||||
|
||||
let shouldRetry = false
|
||||
|
||||
if (xError > 5 || yError > 5 || zError > 5) {
|
||||
if (cnt > 2) {
|
||||
console.log('xVal', vals[0], 'xError', xError)
|
||||
console.log('yVal', vals[1], 'yError', yError)
|
||||
console.log('zVal', vals[2], 'zError', zError)
|
||||
|
||||
throw new Error('Camera position not as expected')
|
||||
}
|
||||
shouldRetry = true
|
||||
}
|
||||
await page.getByRole('button', { name: 'Exit Sketch' }).click()
|
||||
await page.waitForTimeout(100)
|
||||
if (shouldRetry) await bakeInRetries(mouseActions, xyz, cnt + 1)
|
||||
}
|
||||
await bakeInRetries(async () => {
|
||||
await page.mouse.move(700, 200)
|
||||
await page.mouse.down({ button: 'right' })
|
||||
await page.mouse.move(600, 303)
|
||||
await page.mouse.up({ button: 'right' })
|
||||
}, [4, -10.5, -120])
|
||||
|
||||
await bakeInRetries(async () => {
|
||||
await page.keyboard.down('Shift')
|
||||
await page.mouse.move(600, 200)
|
||||
await page.mouse.down({ button: 'right' })
|
||||
await page.mouse.move(700, 200, { steps: 2 })
|
||||
await page.mouse.up({ button: 'right' })
|
||||
await page.keyboard.up('Shift')
|
||||
}, [-10, -85, -85])
|
||||
|
||||
await u.updateCamPosition(camPos)
|
||||
|
||||
await u.clearCommandLogs()
|
||||
await u.closeDebugPanel()
|
||||
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
await page.waitForTimeout(200)
|
||||
|
||||
// zoom
|
||||
await u.doAndWaitForImageDiff(async () => {
|
||||
await page.keyboard.down('Control')
|
||||
await page.mouse.move(700, 400)
|
||||
await page.mouse.down({ button: 'right' })
|
||||
await page.mouse.move(700, 300)
|
||||
await page.mouse.up({ button: 'right' })
|
||||
await page.keyboard.up('Control')
|
||||
|
||||
await u.openDebugPanel()
|
||||
await page.waitForTimeout(300)
|
||||
await u.clearCommandLogs()
|
||||
|
||||
await u.closeDebugPanel()
|
||||
}, 300)
|
||||
|
||||
// zoom with scroll
|
||||
await u.openAndClearDebugPanel()
|
||||
// TODO, it appears we don't get the cam setting back from the engine when the interaction is zoom into `backInRetries` once the information is sent back on zoom
|
||||
// await expect(Math.abs(Number(await page.getByTestId('cam-x-position').inputValue()) + 12)).toBeLessThan(1.5)
|
||||
// await expect(Math.abs(Number(await page.getByTestId('cam-y-position').inputValue()) - 85)).toBeLessThan(1.5)
|
||||
// await expect(Math.abs(Number(await page.getByTestId('cam-z-position').inputValue()) - 85)).toBeLessThan(1.5)
|
||||
|
||||
await page.getByRole('button', { name: 'Exit Sketch' }).click()
|
||||
|
||||
await bakeInRetries(async () => {
|
||||
await page.mouse.move(700, 400)
|
||||
await page.mouse.wheel(0, -100)
|
||||
}, [1, -94, -94])
|
||||
})
|
||||
|
||||
test('if you write invalid kcl you get inlined errors', async ({ page }) => {
|
||||
const u = getUtils(page)
|
||||
await page.setViewportSize({ width: 1000, height: 500 })
|
||||
@ -351,8 +474,18 @@ test('Auto complete works', async ({ page }) => {
|
||||
const u = getUtils(page)
|
||||
// const PUR = 400 / 37.5 //pixeltoUnitRatio
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
const lspStartPromise = page.waitForEvent('console', async (message) => {
|
||||
// it would be better to wait for a message that the kcl lsp has started by looking for the message message.text().includes('[lsp] [window/logMessage]')
|
||||
// but that doesn't seem to make it to the console for macos/safari :(
|
||||
if (message.text().includes('start kcl lsp')) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 200))
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await lspStartPromise
|
||||
|
||||
// this test might be brittle as we add and remove functions
|
||||
// but should also be easy to update.
|
||||
@ -395,6 +528,55 @@ test('Auto complete works', async ({ page }) => {
|
||||
|> xLine(5, %) // lin`)
|
||||
})
|
||||
|
||||
// Stored settings validation test
|
||||
test('Stored settings are validated and fall back to defaults', async ({
|
||||
page,
|
||||
context,
|
||||
}) => {
|
||||
// Override beforeEach test setup
|
||||
// with corrupted settings
|
||||
await context.addInitScript(async () => {
|
||||
const storedSettings = JSON.parse(
|
||||
localStorage.getItem('SETTINGS_PERSIST_KEY') || '{}'
|
||||
)
|
||||
|
||||
// Corrupt the settings
|
||||
storedSettings.baseUnit = 'invalid'
|
||||
storedSettings.cameraControls = `() => alert('hack the planet')`
|
||||
storedSettings.defaultDirectory = 123
|
||||
storedSettings.defaultProjectName = false
|
||||
|
||||
localStorage.setItem('SETTINGS_PERSIST_KEY', JSON.stringify(storedSettings))
|
||||
})
|
||||
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
await page.goto('/', { waitUntil: 'domcontentloaded' })
|
||||
|
||||
// Check the toast appeared
|
||||
await expect(
|
||||
page.getByText(`Error validating persisted settings:`, {
|
||||
exact: false,
|
||||
})
|
||||
).toBeVisible()
|
||||
|
||||
// Check the settings were reset
|
||||
const storedSettings = JSON.parse(
|
||||
await page.evaluate(
|
||||
() => localStorage.getItem('SETTINGS_PERSIST_KEY') || '{}'
|
||||
)
|
||||
)
|
||||
await expect(storedSettings.baseUnit).toBe(initialSettings.baseUnit)
|
||||
await expect(storedSettings.cameraControls).toBe(
|
||||
initialSettings.cameraControls
|
||||
)
|
||||
await expect(storedSettings.defaultDirectory).toBe(
|
||||
initialSettings.defaultDirectory
|
||||
)
|
||||
await expect(storedSettings.defaultProjectName).toBe(
|
||||
initialSettings.defaultProjectName
|
||||
)
|
||||
})
|
||||
|
||||
// Onboarding tests
|
||||
test('Onboarding redirects and code updating', async ({ page, context }) => {
|
||||
const u = getUtils(page)
|
||||
@ -455,7 +637,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => {
|
||||
const emptySpaceClick = () =>
|
||||
page.mouse.click(728, 343).then(() => page.waitForTimeout(100))
|
||||
const topHorzSegmentClick = () =>
|
||||
page.mouse.click(709, 289).then(() => page.waitForTimeout(100))
|
||||
page.mouse.click(709, 290).then(() => page.waitForTimeout(100))
|
||||
const bottomHorzSegmentClick = () =>
|
||||
page.mouse.click(767, 396).then(() => page.waitForTimeout(100))
|
||||
|
||||
@ -470,13 +652,12 @@ test('Selections work on fresh and edited sketch', async ({ page }) => {
|
||||
await page.waitForTimeout(700) // wait for animation
|
||||
|
||||
const startXPx = 600
|
||||
await u.closeDebugPanel()
|
||||
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toHaveText(`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt(${commonPoints.startAt}, %)`)
|
||||
|
||||
await u.closeDebugPanel()
|
||||
|
||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||
|
||||
await expect(page.locator('.cm-content'))
|
||||
@ -557,13 +738,18 @@ test('Selections work on fresh and edited sketch', async ({ page }) => {
|
||||
await emptySpaceClick()
|
||||
|
||||
// select segment in editor than another segment in scene and check there are two cursors
|
||||
await page.getByText(` |> line([-${commonPoints.num2}, 0], %)`).click()
|
||||
await page.waitForTimeout(300)
|
||||
await page.keyboard.down('Shift')
|
||||
await expect(page.locator('.cm-cursor')).toHaveCount(1)
|
||||
// TODO change this back to shift click in the scene, not cmd click in the editor
|
||||
await bottomHorzSegmentClick()
|
||||
await page.keyboard.up('Shift')
|
||||
|
||||
await expect(page.locator('.cm-cursor')).toHaveCount(1)
|
||||
|
||||
await page.keyboard.down(process.platform === 'linux' ? 'Control' : 'Meta')
|
||||
await page.waitForTimeout(100)
|
||||
await page.getByText(` |> line([-${commonPoints.num2}, 0], %)`).click()
|
||||
|
||||
await expect(page.locator('.cm-cursor')).toHaveCount(2)
|
||||
await page.waitForTimeout(500)
|
||||
await page.keyboard.up(process.platform === 'linux' ? 'Control' : 'Meta')
|
||||
|
||||
// clear selection by clicking on nothing
|
||||
await emptySpaceClick()
|
||||
@ -622,12 +808,12 @@ test('Command bar works and can change a setting', async ({ page }) => {
|
||||
const themeOption = page.getByRole('option', { name: 'Set Theme' })
|
||||
await expect(themeOption).toBeVisible()
|
||||
await themeOption.click()
|
||||
const themeInput = page.getByPlaceholder('Select an option')
|
||||
const themeInput = page.getByPlaceholder('system')
|
||||
await expect(themeInput).toBeVisible()
|
||||
await expect(themeInput).toBeFocused()
|
||||
// Select dark theme
|
||||
await page.keyboard.press('ArrowDown')
|
||||
await page.keyboard.press('ArrowDown')
|
||||
await page.keyboard.press('ArrowUp')
|
||||
await expect(page.getByRole('option', { name: Themes.Dark })).toHaveAttribute(
|
||||
'data-headlessui-state',
|
||||
'active'
|
||||
@ -748,13 +934,13 @@ test('Can add multiple sketches', async ({ page }) => {
|
||||
await page.waitForTimeout(500) // TODO detect animation ending, or disable animation
|
||||
|
||||
const startXPx = 600
|
||||
await u.closeDebugPanel()
|
||||
await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10)
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toHaveText(`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt(${commonPoints.startAt}, %)`)
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
await u.closeDebugPanel()
|
||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
@ -995,7 +1181,6 @@ test('Deselecting line tool should mean nothing happens on click', async ({
|
||||
}) => {
|
||||
const u = getUtils(page)
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
const PUR = 400 / 37.5 //pixeltoUnitRatio
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await u.openDebugPanel()
|
||||
@ -1053,3 +1238,279 @@ test('Deselecting line tool should mean nothing happens on click', async ({
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
})
|
||||
|
||||
test('Can edit segments by dragging their handles', async ({
|
||||
page,
|
||||
context,
|
||||
}) => {
|
||||
const u = getUtils(page)
|
||||
await context.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt([4.61, -14.01], %)
|
||||
|> line([12.73, -0.09], %)
|
||||
|> tangentialArcTo([24.95, -5.38], %)`
|
||||
)
|
||||
})
|
||||
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Start Sketch' })
|
||||
).not.toBeDisabled()
|
||||
|
||||
const startPX = [652, 418]
|
||||
const lineEndPX = [794, 416]
|
||||
const arcEndPX = [893, 318]
|
||||
|
||||
const dragPX = 30
|
||||
|
||||
await page.getByText('startProfileAt([4.61, -14.01], %)').click()
|
||||
await expect(page.getByRole('button', { name: 'Edit Sketch' })).toBeVisible()
|
||||
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
||||
await page.waitForTimeout(100)
|
||||
let prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
const step5 = { steps: 5 }
|
||||
|
||||
// drag startProfieAt handle
|
||||
await page.mouse.move(startPX[0], startPX[1])
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(startPX[0] + dragPX, startPX[1] - dragPX, step5)
|
||||
await page.mouse.up()
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
// drag line handle
|
||||
await page.mouse.move(lineEndPX[0] + dragPX, lineEndPX[1] - dragPX)
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(
|
||||
lineEndPX[0] + dragPX * 2,
|
||||
lineEndPX[1] - dragPX * 2,
|
||||
step5
|
||||
)
|
||||
await page.mouse.up()
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
// drag tangentialArcTo handle
|
||||
await page.mouse.move(arcEndPX[0], arcEndPX[1])
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(arcEndPX[0] + dragPX, arcEndPX[1] - dragPX, step5)
|
||||
await page.mouse.up()
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
|
||||
// expect the code to have changed
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toHaveText(`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt([7.01, -11.79], %)
|
||||
|> line([14.69, 2.73], %)
|
||||
|> tangentialArcTo([27.6, -3.25], %)`)
|
||||
})
|
||||
|
||||
test('Snap to close works (at any scale)', async ({ page }) => {
|
||||
const u = getUtils(page)
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await u.openDebugPanel()
|
||||
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Start Sketch' })
|
||||
).not.toBeDisabled()
|
||||
await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible()
|
||||
|
||||
const doSnapAtDifferentScales = async (
|
||||
camPos: [number, number, number],
|
||||
expectedCode: string
|
||||
) => {
|
||||
await u.clearCommandLogs()
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
await page.waitForTimeout(100)
|
||||
|
||||
await u.openAndClearDebugPanel()
|
||||
await u.updateCamPosition(camPos)
|
||||
await u.closeDebugPanel()
|
||||
|
||||
// select a plane
|
||||
await page.mouse.click(700, 200)
|
||||
await expect(page.locator('.cm-content')).toHaveText(
|
||||
`const part001 = startSketchOn('XZ')`
|
||||
)
|
||||
|
||||
let prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
const pointA = [700, 200]
|
||||
const pointB = [900, 200]
|
||||
const pointC = [900, 400]
|
||||
|
||||
// draw three lines
|
||||
await page.mouse.click(pointA[0], pointA[1])
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(pointB[0], pointB[1])
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(pointC[0], pointC[1])
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.move(pointA[0] - 12, pointA[1] + 12)
|
||||
const pointNotQuiteA = [pointA[0] - 7, pointA[1] + 7]
|
||||
await page.mouse.move(pointNotQuiteA[0], pointNotQuiteA[1], { steps: 10 })
|
||||
|
||||
await page.mouse.click(pointNotQuiteA[0], pointNotQuiteA[1])
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(prevContent)
|
||||
prevContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await expect(page.locator('.cm-content')).toHaveText(expectedCode)
|
||||
|
||||
// exit sketch
|
||||
await u.openAndClearDebugPanel()
|
||||
await page.getByRole('button', { name: 'Exit Sketch' }).click()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
await u.removeCurrentCode()
|
||||
}
|
||||
|
||||
const codeTemplate = (
|
||||
scale = 1,
|
||||
fudge = 0
|
||||
) => `const part001 = startSketchOn('XZ')
|
||||
|> startProfileAt([${roundOff(scale * 87.68)}, ${roundOff(scale * 43.84)}], %)
|
||||
|> line([${roundOff(scale * 175.36)}, 0], %)
|
||||
|> line([0, -${roundOff(scale * 175.36) + fudge}], %)
|
||||
|> close(%)`
|
||||
|
||||
await doSnapAtDifferentScales([0, 100, 100], codeTemplate(0.01, 0.01))
|
||||
|
||||
await doSnapAtDifferentScales([0, 10000, 10000], codeTemplate())
|
||||
})
|
||||
|
||||
test('Sketch on face', async ({ page, context }) => {
|
||||
const u = getUtils(page)
|
||||
await context.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`const part001 = startSketchOn('-XZ')
|
||||
|> startProfileAt([3.29, 7.86], %)
|
||||
|> line([2.48, 2.44], %)
|
||||
|> line([2.66, 1.17], %)
|
||||
|> line([3.75, 0.46], %)
|
||||
|> line([4.99, -0.46], %)
|
||||
|> line([3.3, -2.12], %)
|
||||
|> line([2.16, -3.33], %)
|
||||
|> line([0.85, -3.08], %)
|
||||
|> line([-0.18, -3.36], %)
|
||||
|> line([-3.86, -2.73], %)
|
||||
|> line([-17.67, 0.85], %)
|
||||
|> close(%)
|
||||
|> extrude(5 + 7, %)`
|
||||
)
|
||||
})
|
||||
|
||||
await page.setViewportSize({ width: 1200, height: 500 })
|
||||
await page.goto('/')
|
||||
await u.waitForAuthSkipAppStart()
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Start Sketch' })
|
||||
).not.toBeDisabled()
|
||||
|
||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||
|
||||
let previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(793, 133)
|
||||
|
||||
const firstClickPosition = [612, 238]
|
||||
const secondClickPosition = [661, 242]
|
||||
const thirdClickPosition = [609, 267]
|
||||
|
||||
await page.waitForTimeout(300)
|
||||
|
||||
await page.mouse.click(firstClickPosition[0], firstClickPosition[1])
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(secondClickPosition[0], secondClickPosition[1])
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(thirdClickPosition[0], thirdClickPosition[1])
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await page.mouse.click(firstClickPosition[0], firstClickPosition[1])
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toContainText(`const part002 = startSketchOn(part001, 'seg01')
|
||||
|> startProfileAt([1.03, 1.03], %)
|
||||
|> line([4.18, -0.35], %)
|
||||
|> line([-4.44, -2.13], %)
|
||||
|> close(%)`)
|
||||
|
||||
await u.openAndClearDebugPanel()
|
||||
await page.getByRole('button', { name: 'Exit Sketch' }).click()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
|
||||
await u.updateCamPosition([1049, 239, 686])
|
||||
await u.closeDebugPanel()
|
||||
|
||||
await page.getByText('startProfileAt([1.03, 1.03], %)').click()
|
||||
await expect(page.getByRole('button', { name: 'Edit Sketch' })).toBeVisible()
|
||||
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
||||
await page.waitForTimeout(200)
|
||||
|
||||
const pointToDragFirst = [691, 237]
|
||||
await page.mouse.move(pointToDragFirst[0], pointToDragFirst[1])
|
||||
await page.mouse.down()
|
||||
await page.mouse.move(pointToDragFirst[0] - 20, pointToDragFirst[1], {
|
||||
steps: 5,
|
||||
})
|
||||
await page.mouse.up()
|
||||
await page.waitForTimeout(100)
|
||||
await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent)
|
||||
previousCodeContent = await page.locator('.cm-content').innerText()
|
||||
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toContainText(`const part002 = startSketchOn(part001, 'seg01')
|
||||
|> startProfileAt([1.03, 1.03], %)
|
||||
|> line([2.81, -0.33], %)
|
||||
|> line([-4.44, -2.13], %)
|
||||
|> close(%)`)
|
||||
|
||||
// exit sketch
|
||||
await u.openAndClearDebugPanel()
|
||||
await page.getByRole('button', { name: 'Exit Sketch' }).click()
|
||||
await u.expectCmdLog('[data-message-type="execution-done"]')
|
||||
|
||||
await page.getByText('startProfileAt([1.03, 1.03], %)').click()
|
||||
|
||||
await expect(page.getByRole('button', { name: 'Extrude' })).not.toBeDisabled()
|
||||
await page.getByRole('button', { name: 'Extrude' }).click()
|
||||
|
||||
await expect(page.getByTestId('command-bar')).toBeVisible()
|
||||
|
||||
await page.keyboard.press('Enter')
|
||||
await expect(page.getByText('Confirm Extrude')).toBeVisible()
|
||||
await page.keyboard.press('Enter')
|
||||
|
||||
await expect(page.locator('.cm-content'))
|
||||
.toContainText(`const part002 = startSketchOn(part001, 'seg01')
|
||||
|> startProfileAt([1.03, 1.03], %)
|
||||
|> line([2.81, -0.33], %)
|
||||
|> line([-4.44, -2.13], %)
|
||||
|> close(%)
|
||||
|> extrude(5 + 7, %)`)
|
||||
})
|
||||
|