Compare commits
50 Commits
jtran/disa
...
ryan-branc
Author | SHA1 | Date | |
---|---|---|---|
c79cb0e8a4 | |||
638b4ce3e8 | |||
c4db8b7c9a | |||
6df8e97782 | |||
292cc4d43c | |||
c525889832 | |||
b0e9aac138 | |||
0c6f01fcff | |||
6e3eaf0df5 | |||
3269cdf812 | |||
6a4834989a | |||
bc77507af8 | |||
34ae05e4d7 | |||
11d469bdeb | |||
25aa2d80b2 | |||
9960a1f0c8 | |||
a05bc9cc57 | |||
96c039a903 | |||
0bfef56ea3 | |||
325235e234 | |||
297d5aa219 | |||
c2554bc996 | |||
896c568914 | |||
a98c2a0f84 | |||
f0ab9e47c4 | |||
a533d8a031 | |||
495fb0480e | |||
c34cffdcb8 | |||
527b00f581 | |||
7ed4e2fb64 | |||
6831d828c5 | |||
6331c9f1dd | |||
864796cbc6 | |||
1dec1d4c49 | |||
381d45f651 | |||
645747ea66 | |||
286af1ff51 | |||
bca3e2f44b | |||
946479711d | |||
acfd65d4b4 | |||
aefcd845ea | |||
0434b0e0d8 | |||
cd3381cd56 | |||
6882a7ff14 | |||
9cdcc43ac3 | |||
e75b1dac86 | |||
56a402e4d2 | |||
b4b59219f0 | |||
89f528e598 | |||
a977d0d386 |
212
.github/workflows/playwright.yml
vendored
212
.github/workflows/playwright.yml
vendored
@ -105,108 +105,79 @@ jobs:
|
|||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build web
|
- name: build web
|
||||||
run: yarn build:local
|
run: yarn build:local
|
||||||
- name: Run ubuntu/chrome snapshots
|
# - name: Run ubuntu/chrome snapshots
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
run: |
|
# run: |
|
||||||
yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts
|
# yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts
|
||||||
env:
|
# env:
|
||||||
CI: true
|
# CI: true
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
# token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
|
# snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }}
|
||||||
- name: Clean up test-results
|
# - name: Clean up test-results
|
||||||
if: always()
|
# if: always()
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
run: rm -r test-results
|
# run: rm -r test-results
|
||||||
- name: check for changes
|
# - name: check for changes
|
||||||
id: git-check
|
# id: git-check
|
||||||
run: |
|
# run: |
|
||||||
git add .
|
# git add .
|
||||||
if git status | grep -q "Changes to be committed"
|
# if git status | grep -q "Changes to be committed"
|
||||||
then echo "modified=true" >> $GITHUB_OUTPUT
|
# then echo "modified=true" >> $GITHUB_OUTPUT
|
||||||
else echo "modified=false" >> $GITHUB_OUTPUT
|
# else echo "modified=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
# fi
|
||||||
- name: Commit changes, if any
|
# - name: Commit changes, if any
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
# if: steps.git-check.outputs.modified == 'true'
|
||||||
run: |
|
# run: |
|
||||||
git add .
|
# git add .
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
# git config --local user.name "github-actions[bot]"
|
||||||
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
# git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
git fetch origin
|
# git fetch origin
|
||||||
echo ${{ github.head_ref }}
|
# echo ${{ github.head_ref }}
|
||||||
git checkout ${{ github.head_ref }}
|
# git checkout ${{ github.head_ref }}
|
||||||
# TODO when webkit works on ubuntu remove the os part of the commit message
|
# # TODO when webkit works on ubuntu remove the os part of the commit message
|
||||||
git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" || true
|
# git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" || true
|
||||||
git push
|
# git push
|
||||||
git push origin ${{ github.head_ref }}
|
# git push origin ${{ github.head_ref }}
|
||||||
# only upload artifacts if there's actually changes
|
# # only upload artifacts if there's actually changes
|
||||||
- uses: actions/upload-artifact@v4
|
# - uses: actions/upload-artifact@v4
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
# if: steps.git-check.outputs.modified == 'true'
|
||||||
with:
|
# with:
|
||||||
name: playwright-report-ubuntu-${{ github.sha }}
|
# name: playwright-report-ubuntu-${{ github.sha }}
|
||||||
path: playwright-report/
|
# path: playwright-report/
|
||||||
retention-days: 30
|
# retention-days: 30
|
||||||
# if have previous run results, use them
|
# # if have previous run results, use them
|
||||||
- uses: actions/download-artifact@v4
|
# - uses: actions/download-artifact@v4
|
||||||
if: always()
|
# if: always()
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
with:
|
# with:
|
||||||
name: test-results-ubuntu-${{ github.sha }}
|
# name: test-results-ubuntu-${{ github.sha }}
|
||||||
path: test-results/
|
# path: test-results/
|
||||||
- name: Run ubuntu/chrome flow (with retries)
|
- name: Run ubuntu/chrome flow (with retries)
|
||||||
id: retry
|
id: retry
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -f "test-results/.last-run.json" ]]; then
|
yarn playwright test --project="Google Chrome" --workers=1 --grep=@focus --repeat-each=100
|
||||||
# if no last run artifact, than run plawright normally
|
# if [[ ! -f "test-results/.last-run.json" ]]; then
|
||||||
echo "run playwright normally"
|
# # if no last run artifact, than run plawright normally
|
||||||
yarn playwright test --project="Google Chrome" e2e/playwright/flow-tests.spec.ts || true
|
# echo "run playwright normally"
|
||||||
|
# yarn playwright test --project="Google Chrome" e2e/playwright/flow-tests.spec.ts
|
||||||
|
# # # send to axiom
|
||||||
|
# node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
|
# else
|
||||||
|
# echo "run playwright with last failed tests"
|
||||||
|
# yarn playwright test --project="Google Chrome" --last-failed e2e/playwright/flow-tests.spec.ts
|
||||||
# # send to axiom
|
# # send to axiom
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
# node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
retry=1
|
|
||||||
max_retrys=4
|
|
||||||
|
|
||||||
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
|
||||||
while [[ $retry -le $max_retrys ]]; do
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
echo "retried=true" >>$GITHUB_OUTPUT
|
|
||||||
echo "run playwright with last failed tests and retry $retry"
|
|
||||||
yarn playwright test --project="Google Chrome" --last-failed e2e/playwright/flow-tests.spec.ts || true
|
|
||||||
# send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
retry=$((retry + 1))
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
# if it still fails after 3 retrys, then fail the job
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
- name: send to axiom
|
# - name: send to axiom
|
||||||
if: always()
|
# if: always()
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log
|
# node playwrightProcess.mjs | tee /tmp/github-actions.log
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
@ -306,48 +277,19 @@ jobs:
|
|||||||
id: retry
|
id: retry
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -f "test-results/.last-run.json" ]]; then
|
yarn playwright test --project="webkit" --workers=1 --grep=@focus --repeat-each=1
|
||||||
# if no last run artifact, than run plawright normally
|
# if [[ ! -f "test-results/.last-run.json" ]]; then
|
||||||
echo "run playwright normally"
|
# # if no last run artifact, than run plawright normally
|
||||||
yarn playwright test --project="webkit" e2e/playwright/flow-tests.spec.ts || true
|
# echo "run playwright normally"
|
||||||
|
# yarn playwright test --project="webkit" e2e/playwright/flow-tests.spec.ts
|
||||||
|
# # # send to axiom
|
||||||
|
# node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
|
# else
|
||||||
|
# echo "run playwright with last failed tests"
|
||||||
|
# yarn playwright test --project="webkit" --last-failed e2e/playwright/flow-tests.spec.ts
|
||||||
# # send to axiom
|
# # send to axiom
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
# node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
retry=1
|
|
||||||
max_retrys=4
|
|
||||||
|
|
||||||
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
|
|
||||||
while [[ $retry -le $max_retrys ]]; do
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
echo "retried=true" >>$GITHUB_OUTPUT
|
|
||||||
echo "run playwright with last failed tests and retry $retry"
|
|
||||||
yarn playwright test --project="webkit" --last-failed e2e/playwright/flow-tests.spec.ts || true
|
|
||||||
# send to axiom
|
|
||||||
node playwrightProcess.mjs | tee /tmp/github-actions.log > /dev/null 2>&1
|
|
||||||
retry=$((retry + 1))
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "retried=false" >>$GITHUB_OUTPUT
|
|
||||||
|
|
||||||
if [[ -f "test-results/.last-run.json" ]]; then
|
|
||||||
failed_tests=$(jq '.failedTests | length' test-results/.last-run.json)
|
|
||||||
if [[ $failed_tests -gt 0 ]]; then
|
|
||||||
# if it still fails after 3 retrys, then fail the job
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}
|
||||||
|
@ -124,7 +124,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -166,7 +166,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -180,7 +180,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -198,7 +198,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -128,7 +128,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -170,7 +170,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -184,7 +184,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -202,7 +202,7 @@ const extrusion = extrude(5, sketch001)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -43,7 +43,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -85,7 +85,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -99,7 +99,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -117,7 +117,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -455,7 +455,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -497,7 +497,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -511,7 +511,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -529,7 +529,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -42,7 +42,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -84,7 +84,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -98,7 +98,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -116,7 +116,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -454,7 +454,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -496,7 +496,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -510,7 +510,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -528,7 +528,7 @@ const extrusion = extrude(10, sketch001)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -44,7 +44,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -86,7 +86,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -100,7 +100,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -118,7 +118,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -456,7 +456,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -498,7 +498,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -512,7 +512,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -530,7 +530,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -136,7 +136,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -178,7 +178,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -192,7 +192,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -210,7 +210,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -548,7 +548,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -590,7 +590,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -604,7 +604,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -622,7 +622,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -41,7 +41,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -83,7 +83,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -97,7 +97,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -115,7 +115,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -453,7 +453,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -495,7 +495,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -509,7 +509,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -527,7 +527,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -41,7 +41,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -83,7 +83,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -97,7 +97,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -115,7 +115,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -453,7 +453,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -495,7 +495,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -509,7 +509,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -527,7 +527,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -19,8 +19,8 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> line([10, 0], %)
|
|> line([10, 0], %)
|
||||||
|> arc({
|
|> arc({
|
||||||
angleStart: 0,
|
angle_start: 0,
|
||||||
angleEnd: 280,
|
angle_end: 280,
|
||||||
radius: 16
|
radius: 16
|
||||||
}, %)
|
}, %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
@ -34,9 +34,9 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The end angle.
|
// The end angle.
|
||||||
angleEnd: number,
|
angle_end: number,
|
||||||
// The start angle.
|
// The start angle.
|
||||||
angleStart: number,
|
angle_start: number,
|
||||||
// The radius.
|
// The radius.
|
||||||
radius: number,
|
radius: number,
|
||||||
} |
|
} |
|
||||||
@ -52,7 +52,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -94,7 +94,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -108,7 +108,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -126,7 +126,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -464,7 +464,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -506,7 +506,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -520,7 +520,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -538,7 +538,7 @@ const exampleSketch = startSketchOn('XZ')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -47,7 +47,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -89,7 +89,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -103,7 +103,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -121,7 +121,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -459,7 +459,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -501,7 +501,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -515,7 +515,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -533,7 +533,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -149,7 +149,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -163,7 +163,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -181,7 +181,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -223,7 +223,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -237,7 +237,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -549,7 +549,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -563,7 +563,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -581,7 +581,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -623,7 +623,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -637,7 +637,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -82,7 +82,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -96,7 +96,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -114,7 +114,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -324,7 +324,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
},
|
},
|
||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -366,7 +366,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -380,7 +380,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -619,7 +619,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -661,7 +661,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -675,7 +675,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -693,7 +693,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -42,7 +42,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -84,7 +84,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -98,7 +98,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -116,7 +116,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -454,7 +454,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -496,7 +496,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -510,7 +510,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -528,7 +528,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -19,8 +19,8 @@ const example = startSketchOn('XZ')
|
|||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
|> line([10, 0], %)
|
|> line([10, 0], %)
|
||||||
|> arc({
|
|> arc({
|
||||||
angleStart: 120,
|
angle_end: 0,
|
||||||
angleEnd: 0,
|
angle_start: 120,
|
||||||
radius: 5
|
radius: 5
|
||||||
}, %)
|
}, %)
|
||||||
|> line([5, 0], %)
|
|> line([5, 0], %)
|
||||||
@ -41,8 +41,8 @@ const example = startSketchOn('XZ')
|
|||||||
const exampleSketch = startSketchOn('XZ')
|
const exampleSketch = startSketchOn('XZ')
|
||||||
|> startProfileAt([-10, 0], %)
|
|> startProfileAt([-10, 0], %)
|
||||||
|> arc({
|
|> arc({
|
||||||
angleStart: 120,
|
angle_end: -60,
|
||||||
angleEnd: -60,
|
angle_start: 120,
|
||||||
radius: 5
|
radius: 5
|
||||||
}, %)
|
}, %)
|
||||||
|> line([10, 0], %)
|
|> line([10, 0], %)
|
||||||
@ -67,7 +67,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -109,7 +109,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -123,7 +123,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -141,7 +141,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -479,7 +479,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -493,7 +493,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -511,7 +511,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -553,7 +553,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -567,7 +567,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -149,7 +149,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -163,7 +163,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -181,7 +181,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -223,7 +223,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -237,7 +237,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -549,7 +549,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -563,7 +563,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -581,7 +581,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -623,7 +623,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -637,7 +637,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -19,9 +19,10 @@ const part001 = startSketchOn('XY')
|
|||||||
|> circle([5, 5], 10, %)
|
|> circle([5, 5], 10, %)
|
||||||
|> extrude(10, %)
|
|> extrude(10, %)
|
||||||
|> helix({
|
|> helix({
|
||||||
angleStart: 0,
|
angle_start: 0,
|
||||||
ccw: true,
|
ccw: true,
|
||||||
revolutions: 16
|
revolutions: 16,
|
||||||
|
angle_start: 0
|
||||||
}, %)
|
}, %)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ const part001 = startSketchOn('XY')
|
|||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// Start angle (in degrees).
|
// Start angle (in degrees).
|
||||||
angleStart: number,
|
angle_start: number,
|
||||||
// Is the helix rotation counter clockwise? The default is `false`.
|
// Is the helix rotation counter clockwise? The default is `false`.
|
||||||
ccw: string,
|
ccw: string,
|
||||||
// Length of the helix. If this argument is not provided, the height of the extrude group is used.
|
// Length of the helix. If this argument is not provided, the height of the extrude group is used.
|
||||||
@ -50,7 +51,7 @@ const part001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -64,7 +65,7 @@ const part001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -82,7 +83,7 @@ const part001 = startSketchOn('XY')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -124,7 +125,7 @@ const part001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -138,7 +139,7 @@ const part001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -441,7 +442,7 @@ const part001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -455,7 +456,7 @@ const part001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -473,7 +474,7 @@ const part001 = startSketchOn('XY')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -515,7 +516,7 @@ const part001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -529,7 +530,7 @@ const part001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -53,7 +53,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
* `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
* `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -95,7 +95,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -109,7 +109,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -127,7 +127,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -457,7 +457,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -499,7 +499,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -513,7 +513,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -531,7 +531,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -860,7 +860,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -902,7 +902,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -916,7 +916,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -934,7 +934,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -33,7 +33,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -75,7 +75,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -89,7 +89,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -107,7 +107,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -33,7 +33,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -75,7 +75,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -89,7 +89,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -107,7 +107,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -46,7 +46,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -88,7 +88,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -102,7 +102,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -120,7 +120,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -458,7 +458,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -500,7 +500,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -514,7 +514,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -532,7 +532,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -33,7 +33,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -75,7 +75,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -89,7 +89,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -107,7 +107,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -445,7 +445,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -487,7 +487,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -501,7 +501,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -519,7 +519,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -51,7 +51,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -93,7 +93,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -107,7 +107,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -125,7 +125,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -55,7 +55,7 @@ const example = extrude(-5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -69,7 +69,7 @@ const example = extrude(-5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -87,7 +87,7 @@ const example = extrude(-5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -129,7 +129,7 @@ const example = extrude(-5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -143,7 +143,7 @@ const example = extrude(-5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -44,7 +44,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -86,7 +86,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -100,7 +100,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -118,7 +118,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -53,7 +53,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -67,7 +67,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -85,7 +85,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -127,7 +127,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -141,7 +141,7 @@ const example = extrude(1, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -55,7 +55,7 @@ let vase = layer()
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -69,7 +69,7 @@ let vase = layer()
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -87,7 +87,7 @@ let vase = layer()
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -129,7 +129,7 @@ let vase = layer()
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -143,7 +143,7 @@ let vase = layer()
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -34,7 +34,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -76,7 +76,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -90,7 +90,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -108,7 +108,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -29,7 +29,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -71,7 +71,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -85,7 +85,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -103,7 +103,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -28,7 +28,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -70,7 +70,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -84,7 +84,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -102,7 +102,7 @@ const sketch001 = startSketchOn('XY')
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -250,7 +250,7 @@ uuid |
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -292,7 +292,7 @@ uuid |
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -306,7 +306,7 @@ uuid |
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -324,7 +324,7 @@ uuid |
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -658,7 +658,7 @@ uuid |
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -672,7 +672,7 @@ uuid |
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -690,7 +690,7 @@ uuid |
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -732,7 +732,7 @@ uuid |
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -746,7 +746,7 @@ uuid |
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -137,7 +137,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -151,7 +151,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -169,7 +169,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -211,7 +211,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -225,7 +225,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -528,7 +528,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -542,7 +542,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -560,7 +560,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -602,7 +602,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -616,7 +616,7 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
|
@ -97,7 +97,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -111,7 +111,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -129,7 +129,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -411,7 +411,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -453,7 +453,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -467,7 +467,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -485,7 +485,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -59,7 +59,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -101,7 +101,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -115,7 +115,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -133,7 +133,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -106,9 +106,9 @@ const example002 = extrude(5, exampleSketch002)
|
|||||||
const a1 = startSketchOn({
|
const a1 = startSketchOn({
|
||||||
plane: {
|
plane: {
|
||||||
origin: { x: 0, y: 0, z: 0 },
|
origin: { x: 0, y: 0, z: 0 },
|
||||||
xAxis: { x: 1, y: 0, z: 0 },
|
x_axis: { x: 1, y: 0, z: 0 },
|
||||||
yAxis: { x: 0, y: 1, z: 0 },
|
y_axis: { x: 0, y: 1, z: 0 },
|
||||||
zAxis: { x: 0, y: 0, z: 1 }
|
z_axis: { x: 0, y: 0, z: 1 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|> startProfileAt([0, 0], %)
|
|> startProfileAt([0, 0], %)
|
||||||
@ -141,19 +141,19 @@ const a1 = startSketchOn({
|
|||||||
z: number,
|
z: number,
|
||||||
},
|
},
|
||||||
// What should the plane’s X axis be?
|
// What should the plane’s X axis be?
|
||||||
xAxis: {
|
x_axis: {
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
z: number,
|
z: number,
|
||||||
},
|
},
|
||||||
// What should the plane’s Y axis be?
|
// What should the plane’s Y axis be?
|
||||||
yAxis: {
|
y_axis: {
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
z: number,
|
z: number,
|
||||||
},
|
},
|
||||||
// The z-axis (normal).
|
// The z-axis (normal).
|
||||||
zAxis: {
|
z_axis: {
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
z: number,
|
z: number,
|
||||||
@ -166,7 +166,7 @@ const a1 = startSketchOn({
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -180,7 +180,7 @@ const a1 = startSketchOn({
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -198,7 +198,7 @@ const a1 = startSketchOn({
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -578,7 +578,7 @@ const a1 = startSketchOn({
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -592,7 +592,7 @@ const a1 = startSketchOn({
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -610,7 +610,7 @@ const a1 = startSketchOn({
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
|
1060
docs/kcl/std.json
1060
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -84,7 +84,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -98,7 +98,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -116,7 +116,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -454,7 +454,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -496,7 +496,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -510,7 +510,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -528,7 +528,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -33,7 +33,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -75,7 +75,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -89,7 +89,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -107,7 +107,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -445,7 +445,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -487,7 +487,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -501,7 +501,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -519,7 +519,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -36,7 +36,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -78,7 +78,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -92,7 +92,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -110,7 +110,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -448,7 +448,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -490,7 +490,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -504,7 +504,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -522,7 +522,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -36,7 +36,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -78,7 +78,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -92,7 +92,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -110,7 +110,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -448,7 +448,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -490,7 +490,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -504,7 +504,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -522,7 +522,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -34,7 +34,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -76,7 +76,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -90,7 +90,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -108,7 +108,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -446,7 +446,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -488,7 +488,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -502,7 +502,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -520,7 +520,7 @@ const example = extrude(10, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -32,7 +32,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -74,7 +74,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -88,7 +88,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -106,7 +106,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
@ -444,7 +444,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
`SketchGroup` - A sketch group is a collection of paths.
|
`SketchGroup` - A sketch group is a collection of paths.
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: {
|
on: {
|
||||||
@ -486,7 +486,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
// Chamfers or fillets on this extrude group.
|
// Chamfers or fillets on this extrude group.
|
||||||
filletOrChamfers: [{
|
filletOrChamfers: [{
|
||||||
// The engine id of the edge to fillet.
|
// The engine id of the edge to fillet.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this fillet.
|
// The id of the engine command that called this fillet.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
radius: number,
|
radius: number,
|
||||||
@ -500,7 +500,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
} |
|
} |
|
||||||
{
|
{
|
||||||
// The engine id of the edge to chamfer.
|
// The engine id of the edge to chamfer.
|
||||||
edgeId: uuid,
|
edge_id: uuid,
|
||||||
// The id of the engine command that called this chamfer.
|
// The id of the engine command that called this chamfer.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
length: number,
|
length: number,
|
||||||
@ -518,7 +518,7 @@ const example = extrude(5, exampleSketch)
|
|||||||
id: uuid,
|
id: uuid,
|
||||||
// The sketch group.
|
// The sketch group.
|
||||||
sketchGroup: {
|
sketchGroup: {
|
||||||
// The id of the sketch group (this will change when the engine's reference to it changes.
|
// The id of the sketch group.
|
||||||
id: uuid,
|
id: uuid,
|
||||||
// What the sketch is on (can be a plane or a face).
|
// What the sketch is on (can be a plane or a face).
|
||||||
on: SketchSurface,
|
on: SketchSurface,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { test, expect, Page } from '@playwright/test'
|
import { test, expect, Page, TestInfo } from '@playwright/test'
|
||||||
import {
|
import {
|
||||||
makeTemplate,
|
makeTemplate,
|
||||||
getUtils,
|
getUtils,
|
||||||
@ -139,22 +139,17 @@ async function doBasicSketch(page: Page, openPanes: string[]) {
|
|||||||
await expect(u.codeLocator)
|
await expect(u.codeLocator)
|
||||||
.toHaveText(`const sketch001 = startSketchOn('XZ')
|
.toHaveText(`const sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt(${commonPoints.startAt}, %)`)
|
|> startProfileAt(${commonPoints.startAt}, %)`)
|
||||||
} else {
|
|
||||||
await page.waitForTimeout(500)
|
|
||||||
}
|
}
|
||||||
|
await page.waitForTimeout(500)
|
||||||
|
|
||||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10)
|
||||||
await page.waitForTimeout(500)
|
|
||||||
|
|
||||||
if (openPanes.includes('code')) {
|
if (openPanes.includes('code')) {
|
||||||
await expect(u.codeLocator)
|
await expect(u.codeLocator)
|
||||||
.toHaveText(`const sketch001 = startSketchOn('XZ')
|
.toHaveText(`const sketch001 = startSketchOn('XZ')
|
||||||
|> startProfileAt(${commonPoints.startAt}, %)
|
|> startProfileAt(${commonPoints.startAt}, %)
|
||||||
|> line([${commonPoints.num1}, 0], %)`)
|
|> line([${commonPoints.num1}, 0], %)`)
|
||||||
} else {
|
|
||||||
await page.waitForTimeout(500)
|
|
||||||
}
|
}
|
||||||
|
await page.waitForTimeout(500)
|
||||||
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20)
|
await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 20)
|
||||||
if (openPanes.includes('code')) {
|
if (openPanes.includes('code')) {
|
||||||
await expect(u.codeLocator)
|
await expect(u.codeLocator)
|
||||||
@ -162,9 +157,8 @@ async function doBasicSketch(page: Page, openPanes: string[]) {
|
|||||||
|> startProfileAt(${commonPoints.startAt}, %)
|
|> startProfileAt(${commonPoints.startAt}, %)
|
||||||
|> line([${commonPoints.num1}, 0], %)
|
|> line([${commonPoints.num1}, 0], %)
|
||||||
|> line([0, ${commonPoints.num1 + 0.01}], %)`)
|
|> line([0, ${commonPoints.num1 + 0.01}], %)`)
|
||||||
} else {
|
|
||||||
await page.waitForTimeout(500)
|
|
||||||
}
|
}
|
||||||
|
await page.waitForTimeout(500)
|
||||||
await page.mouse.click(startXPx, 500 - PUR * 20)
|
await page.mouse.click(startXPx, 500 - PUR * 20)
|
||||||
if (openPanes.includes('code')) {
|
if (openPanes.includes('code')) {
|
||||||
await expect(u.codeLocator)
|
await expect(u.codeLocator)
|
||||||
@ -178,7 +172,6 @@ async function doBasicSketch(page: Page, openPanes: string[]) {
|
|||||||
// deselect line tool
|
// deselect line tool
|
||||||
await page.getByRole('button', { name: 'Line', exact: true }).click()
|
await page.getByRole('button', { name: 'Line', exact: true }).click()
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(500)
|
||||||
|
|
||||||
const line1 = await u.getSegmentBodyCoords(`[data-overlay-index="${0}"]`, 0)
|
const line1 = await u.getSegmentBodyCoords(`[data-overlay-index="${0}"]`, 0)
|
||||||
if (openPanes.includes('code')) {
|
if (openPanes.includes('code')) {
|
||||||
expect(await u.getGreatestPixDiff(line1, TEST_COLORS.WHITE)).toBeLessThan(3)
|
expect(await u.getGreatestPixDiff(line1, TEST_COLORS.WHITE)).toBeLessThan(3)
|
||||||
@ -217,7 +210,7 @@ async function doBasicSketch(page: Page, openPanes: string[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test.describe('Basic sketch', () => {
|
test.describe('Basic sketch', () => {
|
||||||
test('code pane open at start', async ({ page }) => {
|
test('code pane open at start', { tag: '@focus' }, async ({ page }) => {
|
||||||
await doBasicSketch(page, ['code'])
|
await doBasicSketch(page, ['code'])
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -925,10 +918,10 @@ test.describe('Editor tests', () => {
|
|||||||
|
|
||||||
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
|
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
|
||||||
await expect(
|
await expect(
|
||||||
page.locator('.cm-lint-marker.cm-lint-marker-error')
|
page.locator('.cm-lintRange.cm-lintRange-error').first()
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
|
|
||||||
await page.locator('.cm-lint-marker.cm-lint-marker-error').hover()
|
await page.locator('.cm-lintRange.cm-lintRange-error').hover()
|
||||||
await expect(page.locator('.cm-diagnosticText').first()).toBeVisible()
|
await expect(page.locator('.cm-diagnosticText').first()).toBeVisible()
|
||||||
await expect(
|
await expect(
|
||||||
page.getByText('Cannot redefine `topAng`').first()
|
page.getByText('Cannot redefine `topAng`').first()
|
||||||
@ -1045,7 +1038,7 @@ test.describe('Editor tests', () => {
|
|||||||
await page.hover('.cm-lint-marker-error')
|
await page.hover('.cm-lint-marker-error')
|
||||||
const searchText =
|
const searchText =
|
||||||
'sketch profile must lie entirely on one side of the revolution axis'
|
'sketch profile must lie entirely on one side of the revolution axis'
|
||||||
await expect(page.getByText(searchText)).toBeVisible()
|
await expect(page.getByText(searchText).first()).toBeVisible()
|
||||||
})
|
})
|
||||||
test.describe('Autocomplete works', () => {
|
test.describe('Autocomplete works', () => {
|
||||||
test('with enter/click to accept the completion', async ({ page }) => {
|
test('with enter/click to accept the completion', async ({ page }) => {
|
||||||
@ -2265,50 +2258,6 @@ test.describe('Onboarding tests', () => {
|
|||||||
await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
|
await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Code resets after confirmation', async ({ page }) => {
|
|
||||||
const initialCode = `const sketch001 = startSketchOn('XZ')`
|
|
||||||
|
|
||||||
// Load the page up with some code so we see the confirmation warning
|
|
||||||
// when we go to replay onboarding
|
|
||||||
await page.addInitScript((code) => {
|
|
||||||
localStorage.setItem('persistCode', code)
|
|
||||||
}, initialCode)
|
|
||||||
|
|
||||||
const u = await getUtils(page)
|
|
||||||
await page.setViewportSize({ width: 1200, height: 500 })
|
|
||||||
await u.waitForAuthSkipAppStart()
|
|
||||||
|
|
||||||
// Replay the onboarding
|
|
||||||
await page.getByRole('link', { name: 'Settings' }).last().click()
|
|
||||||
const replayButton = page.getByRole('button', { name: 'Replay onboarding' })
|
|
||||||
await expect(replayButton).toBeVisible()
|
|
||||||
await replayButton.click()
|
|
||||||
|
|
||||||
// Ensure we see the warning, and that the code has not yet updated
|
|
||||||
await expect(
|
|
||||||
page.getByText('Replaying onboarding resets your code')
|
|
||||||
).toBeVisible()
|
|
||||||
await expect(page.locator('.cm-content')).toHaveText(initialCode)
|
|
||||||
|
|
||||||
const nextButton = page.getByTestId('onboarding-next')
|
|
||||||
await expect(nextButton).toBeVisible()
|
|
||||||
await nextButton.click()
|
|
||||||
|
|
||||||
// Ensure we see the introduction and that the code has been reset
|
|
||||||
await expect(page.getByText('Welcome to Modeling App!')).toBeVisible()
|
|
||||||
await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
|
|
||||||
|
|
||||||
// Ensure we persisted the code to local storage.
|
|
||||||
// Playwright's addInitScript method unfortunately will reset
|
|
||||||
// this code if we try reloading the page as a test,
|
|
||||||
// so this is our best way to test persistence afaik.
|
|
||||||
expect(
|
|
||||||
await page.evaluate(() => {
|
|
||||||
return localStorage.getItem('persistCode')
|
|
||||||
})
|
|
||||||
).toContain('// Shelf Bracket')
|
|
||||||
})
|
|
||||||
|
|
||||||
test('Click through each onboarding step', async ({ page }) => {
|
test('Click through each onboarding step', async ({ page }) => {
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
|
|
||||||
@ -4195,9 +4144,9 @@ test.describe('Sketch tests', () => {
|
|||||||
await page.keyboard.press('Home')
|
await page.keyboard.press('Home')
|
||||||
await page.keyboard.up('Shift')
|
await page.keyboard.up('Shift')
|
||||||
await page.keyboard.press('Backspace')
|
await page.keyboard.press('Backspace')
|
||||||
|
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
||||||
await u.openAndClearDebugPanel()
|
await u.openAndClearDebugPanel()
|
||||||
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
|
|
||||||
await page.getByRole('button', { name: 'Line', exact: true }).click()
|
await page.getByRole('button', { name: 'Line', exact: true }).click()
|
||||||
@ -4901,7 +4850,7 @@ const sketch002 = startSketchOn(extrude001, 'END')
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
// flaky suite
|
||||||
test.describe('Testing constraints', () => {
|
test.describe('Testing constraints', () => {
|
||||||
test('Can constrain line length', async ({ page }) => {
|
test('Can constrain line length', async ({ page }) => {
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -5840,7 +5789,7 @@ test.describe('Testing segment overlays', () => {
|
|||||||
* @param {number} options.steps - The number of steps to perform
|
* @param {number} options.steps - The number of steps to perform
|
||||||
*/
|
*/
|
||||||
const _clickConstrained =
|
const _clickConstrained =
|
||||||
(page: Page) =>
|
(page: Page, testInfo?: TestInfo) =>
|
||||||
async ({
|
async ({
|
||||||
hoverPos,
|
hoverPos,
|
||||||
constraintType,
|
constraintType,
|
||||||
@ -5873,7 +5822,7 @@ test.describe('Testing segment overlays', () => {
|
|||||||
x = hoverPos.x + Math.cos(ang * deg) * 32
|
x = hoverPos.x + Math.cos(ang * deg) * 32
|
||||||
y = hoverPos.y - Math.sin(ang * deg) * 32
|
y = hoverPos.y - Math.sin(ang * deg) * 32
|
||||||
await page.mouse.move(x, y)
|
await page.mouse.move(x, y)
|
||||||
await wiggleMove(page, x, y, 20, 30, ang, 10, 5, locator)
|
await wiggleMove(page, x, y, 20, 30, ang, 10, 5, locator, testInfo)
|
||||||
|
|
||||||
await expect(page.locator('.cm-content')).toContainText(
|
await expect(page.locator('.cm-content')).toContainText(
|
||||||
expectBeforeUnconstrained
|
expectBeforeUnconstrained
|
||||||
@ -5994,7 +5943,7 @@ test.describe('Testing segment overlays', () => {
|
|||||||
test.setTimeout(120000)
|
test.setTimeout(120000)
|
||||||
test('for segments [line, angledLine, lineTo, xLineTo]', async ({
|
test('for segments [line, angledLine, lineTo, xLineTo]', async ({
|
||||||
page,
|
page,
|
||||||
}) => {
|
}, testInfo) => {
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'persistCode',
|
'persistCode',
|
||||||
@ -6038,7 +5987,7 @@ test.describe('Testing segment overlays', () => {
|
|||||||
await expect(page.getByTestId('segment-overlay')).toHaveCount(13)
|
await expect(page.getByTestId('segment-overlay')).toHaveCount(13)
|
||||||
|
|
||||||
const clickUnconstrained = _clickUnconstrained(page)
|
const clickUnconstrained = _clickUnconstrained(page)
|
||||||
const clickConstrained = _clickConstrained(page)
|
const clickConstrained = _clickConstrained(page, testInfo)
|
||||||
|
|
||||||
await u.openAndClearDebugPanel()
|
await u.openAndClearDebugPanel()
|
||||||
await u.sendCustomCmd({
|
await u.sendCustomCmd({
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Binary file not shown.
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@ -1,4 +1,4 @@
|
|||||||
import { expect, Page, Download } from '@playwright/test'
|
import { expect, Page, Download, TestInfo } from '@playwright/test'
|
||||||
import { EngineCommand } from 'lang/std/artifactMap'
|
import { EngineCommand } from 'lang/std/artifactMap'
|
||||||
import os from 'os'
|
import os from 'os'
|
||||||
import fsp from 'fs/promises'
|
import fsp from 'fs/promises'
|
||||||
@ -108,7 +108,7 @@ async function waitForCmdReceive(page: Page, commandType: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const wiggleMove = async (
|
export const wiggleMove = async (
|
||||||
page: any,
|
page: Page,
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
steps: number,
|
steps: number,
|
||||||
@ -116,11 +116,13 @@ export const wiggleMove = async (
|
|||||||
ang: number,
|
ang: number,
|
||||||
amplitude: number,
|
amplitude: number,
|
||||||
freq: number,
|
freq: number,
|
||||||
locator?: string
|
locator?: string,
|
||||||
|
testInfo?: TestInfo
|
||||||
) => {
|
) => {
|
||||||
const tau = Math.PI * 2
|
const tau = Math.PI * 2
|
||||||
const deg = tau / 360
|
const deg = tau / 360
|
||||||
const step = dist / steps
|
const step = dist / steps
|
||||||
|
let mouseMovements: MouseMovement[] = []
|
||||||
for (let i = 0, j = 0; i < dist; i += step, j += 1) {
|
for (let i = 0, j = 0; i < dist; i += step, j += 1) {
|
||||||
if (locator) {
|
if (locator) {
|
||||||
const isElVis = await page.locator(locator).isVisible()
|
const isElVis = await page.locator(locator).isVisible()
|
||||||
@ -133,7 +135,71 @@ export const wiggleMove = async (
|
|||||||
]
|
]
|
||||||
const [xr, yr] = [x2, y2]
|
const [xr, yr] = [x2, y2]
|
||||||
await page.mouse.move(x + xr, y + yr, { steps: 5 })
|
await page.mouse.move(x + xr, y + yr, { steps: 5 })
|
||||||
|
mouseMovements.push({ x: x + xr, y: y + yr, action: 'move' })
|
||||||
}
|
}
|
||||||
|
// element was not visible, show the mouse movements in the screenshot
|
||||||
|
if (testInfo) {
|
||||||
|
testInfo?.annotations.push({
|
||||||
|
type: '⚠️',
|
||||||
|
description:
|
||||||
|
'Wiggling the mouse did not make the element visible - refer to the screenshot below to view mouse movements',
|
||||||
|
})
|
||||||
|
await showMovementsInScreenshot(page, mouseMovements, testInfo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type MouseMovement = {
|
||||||
|
x: number
|
||||||
|
y: number
|
||||||
|
action: 'click' | 'move'
|
||||||
|
}
|
||||||
|
|
||||||
|
const showMovementsInScreenshot = async (
|
||||||
|
page: Page,
|
||||||
|
mouseMovements: MouseMovement[],
|
||||||
|
testInfo: TestInfo
|
||||||
|
) => {
|
||||||
|
await page.evaluate((mouseMovements) => {
|
||||||
|
for (let mouseMovement of mouseMovements) {
|
||||||
|
const { x, y, action } = mouseMovement
|
||||||
|
const elementWidth = action === 'move' ? 3 : 5
|
||||||
|
let circle = document.createElement('div')
|
||||||
|
circle.id = `pw-indicator-x${x}-y${y}`
|
||||||
|
circle.style.position = 'absolute'
|
||||||
|
circle.style.width = `${elementWidth}px`
|
||||||
|
circle.style.height = `${elementWidth}px`
|
||||||
|
circle.style.pointerEvents = 'none'
|
||||||
|
|
||||||
|
if (action === 'click') {
|
||||||
|
circle.style.backgroundColor = 'green'
|
||||||
|
circle.style.transform = 'rotate(45deg)'
|
||||||
|
// in case click and move are at the same position, ensure click is shown behind
|
||||||
|
circle.style.zIndex = '999'
|
||||||
|
} else {
|
||||||
|
circle.style.backgroundColor = 'red'
|
||||||
|
circle.style.borderRadius = '50%'
|
||||||
|
circle.style.zIndex = '1000'
|
||||||
|
}
|
||||||
|
|
||||||
|
circle.style.left = `${x - elementWidth / 2}px`
|
||||||
|
circle.style.top = `${y - elementWidth / 2}px`
|
||||||
|
document.body.appendChild(circle)
|
||||||
|
}
|
||||||
|
}, mouseMovements)
|
||||||
|
|
||||||
|
const screenshot = await page.screenshot()
|
||||||
|
await testInfo.attach('screenshot', {
|
||||||
|
body: screenshot,
|
||||||
|
contentType: 'image/png',
|
||||||
|
})
|
||||||
|
await removeIndicators(page)
|
||||||
|
}
|
||||||
|
|
||||||
|
const removeIndicators = async (page: Page) => {
|
||||||
|
await page.evaluate(() => {
|
||||||
|
let indicators = document.querySelectorAll('[id*="pw-indicator-"]')
|
||||||
|
indicators.forEach((e) => e.remove())
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const circleMove = async (
|
export const circleMove = async (
|
||||||
|
12
packages/codemirror-lsp-client/src/plugin/lint.ts
Normal file
12
packages/codemirror-lsp-client/src/plugin/lint.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { Extension } from '@codemirror/state'
|
||||||
|
import { linter, forEachDiagnostic, Diagnostic } from '@codemirror/lint'
|
||||||
|
|
||||||
|
export default function lspLintExt(): Extension {
|
||||||
|
return linter((view) => {
|
||||||
|
let diagnostics: Diagnostic[] = []
|
||||||
|
forEachDiagnostic(view.state, (d: Diagnostic, from: number, to: number) => {
|
||||||
|
diagnostics.push(d)
|
||||||
|
})
|
||||||
|
return diagnostics
|
||||||
|
})
|
||||||
|
}
|
@ -17,8 +17,8 @@ import type {
|
|||||||
PluginSpec,
|
PluginSpec,
|
||||||
ViewPlugin,
|
ViewPlugin,
|
||||||
} from '@codemirror/view'
|
} from '@codemirror/view'
|
||||||
|
import { setDiagnosticsEffect } from '@codemirror/lint'
|
||||||
import { EditorView, Tooltip } from '@codemirror/view'
|
import { EditorView, Tooltip } from '@codemirror/view'
|
||||||
import { linter } from '@codemirror/lint'
|
|
||||||
|
|
||||||
import type { PublishDiagnosticsParams } from 'vscode-languageserver-protocol'
|
import type { PublishDiagnosticsParams } from 'vscode-languageserver-protocol'
|
||||||
import type * as LSP from 'vscode-languageserver-protocol'
|
import type * as LSP from 'vscode-languageserver-protocol'
|
||||||
@ -36,6 +36,7 @@ import lspAutocompleteExt from './autocomplete'
|
|||||||
import lspHoverExt from './hover'
|
import lspHoverExt from './hover'
|
||||||
import lspFormatExt from './format'
|
import lspFormatExt from './format'
|
||||||
import lspIndentExt from './indent'
|
import lspIndentExt from './indent'
|
||||||
|
import lspLintExt from './lint'
|
||||||
import lspSemanticTokensExt from './semantic-tokens'
|
import lspSemanticTokensExt from './semantic-tokens'
|
||||||
|
|
||||||
const useLast = (values: readonly any[]) => values.reduce((_, v) => v, '')
|
const useLast = (values: readonly any[]) => values.reduce((_, v) => v, '')
|
||||||
@ -215,6 +216,20 @@ export class LanguageServerPlugin implements PluginValue {
|
|||||||
|
|
||||||
if (!this.client.ready) return
|
if (!this.client.ready) return
|
||||||
|
|
||||||
|
// TODO(paultag): This is the *wrong* place for this to live.
|
||||||
|
//
|
||||||
|
// We need to clear diagnostics before updating the code, because
|
||||||
|
// if the code shrinks, the errors/diagnostics can go out of range
|
||||||
|
// of the source code, which cause an exception, breaking all the
|
||||||
|
// things.
|
||||||
|
//
|
||||||
|
// We need some sort of clear diagnostics boolean on the editor
|
||||||
|
// and we can drop this.
|
||||||
|
this.view.dispatch({
|
||||||
|
effects: [setDiagnosticsEffect.of([])],
|
||||||
|
annotations: [],
|
||||||
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Update the state (not the editor) with the new code.
|
// Update the state (not the editor) with the new code.
|
||||||
this.client.textDocumentDidChange({
|
this.client.textDocumentDidChange({
|
||||||
@ -572,8 +587,8 @@ export class LanguageServerPluginSpec
|
|||||||
lspFormatExt(plugin),
|
lspFormatExt(plugin),
|
||||||
lspHoverExt(plugin),
|
lspHoverExt(plugin),
|
||||||
lspIndentExt(),
|
lspIndentExt(),
|
||||||
|
lspLintExt(),
|
||||||
lspSemanticTokensExt(),
|
lspSemanticTokensExt(),
|
||||||
linter(null),
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,14 @@ export default defineConfig({
|
|||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
/* Do not retry */
|
/* Do not retry */
|
||||||
retries: process.env.CI ? 0 : 0,
|
retries: process.env.CI ? 0 : 2,
|
||||||
/* Different amount of parallelism on CI and local. */
|
/* Different amount of parallelism on CI and local. */
|
||||||
workers: process.env.CI ? 4 : 4,
|
workers: process.env.CI ? 1 : 4,
|
||||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||||
reporter: [
|
reporter: [
|
||||||
[process.env.CI ? 'dot' : 'list'],
|
[process.env.CI ? 'dot' : 'list'],
|
||||||
['json', { outputFile: './test-results/report.json' }],
|
['json', { outputFile: './test-results/report.json' }],
|
||||||
|
['html'],
|
||||||
],
|
],
|
||||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||||
use: {
|
use: {
|
||||||
@ -31,6 +32,7 @@ export default defineConfig({
|
|||||||
|
|
||||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
trace: 'retain-on-failure',
|
trace: 'retain-on-failure',
|
||||||
|
screenshot: 'only-on-failure',
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Configure projects for major browsers */
|
/* Configure projects for major browsers */
|
||||||
|
168
src-tauri/Cargo.lock
generated
168
src-tauri/Cargo.lock
generated
@ -188,7 +188,7 @@ dependencies = [
|
|||||||
"tauri-plugin-shell",
|
"tauri-plugin-shell",
|
||||||
"tauri-plugin-updater",
|
"tauri-plugin-updater",
|
||||||
"tokio",
|
"tokio",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -367,7 +367,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -407,7 +407,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -550,7 +550,7 @@ dependencies = [
|
|||||||
"proc-macro-crate 3.1.0",
|
"proc-macro-crate 3.1.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"syn_derive",
|
"syn_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -721,7 +721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
|
checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -792,9 +792,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.11"
|
version = "4.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3"
|
checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@ -802,9 +802,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.11"
|
version = "4.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa"
|
checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@ -816,14 +816,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_derive"
|
name = "clap_derive"
|
||||||
version = "4.5.11"
|
version = "4.5.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e"
|
checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1073,7 +1073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
|
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1083,7 +1083,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
|
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1107,7 +1107,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"strsim 0.10.0",
|
"strsim 0.10.0",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1118,7 +1118,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"darling_core",
|
"darling_core",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1179,7 +1179,7 @@ checksum = "4078275de501a61ceb9e759d37bdd3d7210e654dbc167ac1a3678ef4435ed57b"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1206,7 +1206,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive-docs"
|
name = "derive-docs"
|
||||||
version = "0.1.21"
|
version = "0.1.20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"convert_case 0.6.0",
|
"convert_case 0.6.0",
|
||||||
@ -1216,7 +1216,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_tokenstream",
|
"serde_tokenstream",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1227,7 +1227,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1288,7 +1288,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1320,7 +1320,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1383,7 +1383,7 @@ dependencies = [
|
|||||||
"cc",
|
"cc",
|
||||||
"memchr",
|
"memchr",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"vswhom",
|
"vswhom",
|
||||||
"winreg 0.52.0",
|
"winreg 0.52.0",
|
||||||
]
|
]
|
||||||
@ -1427,7 +1427,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1588,7 +1588,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1704,7 +1704,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1980,7 +1980,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2008,7 +2008,7 @@ dependencies = [
|
|||||||
"inflections",
|
"inflections",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2083,7 +2083,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2571,7 +2571,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
version = "0.2.2"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"approx",
|
"approx",
|
||||||
@ -2581,7 +2581,6 @@ dependencies = [
|
|||||||
"bson",
|
"bson",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
"convert_case 0.6.0",
|
|
||||||
"dashmap 6.0.1",
|
"dashmap 6.0.1",
|
||||||
"databake",
|
"databake",
|
||||||
"derive-docs",
|
"derive-docs",
|
||||||
@ -2603,7 +2602,7 @@ dependencies = [
|
|||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-tungstenite",
|
"tokio-tungstenite",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"tower-lsp",
|
"tower-lsp",
|
||||||
"ts-rs",
|
"ts-rs",
|
||||||
"url",
|
"url",
|
||||||
@ -2629,9 +2628,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.3.9"
|
version = "0.3.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "36b87a9cca545825ba18005c1944b8525fac28867d99984178bf22c79fb5ec25"
|
checksum = "e1777b503442fa4666564cc3ab237d456df853a09648a4b2bb09622d25d021a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -3369,7 +3368,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"regex-syntax 0.8.3",
|
"regex-syntax 0.8.3",
|
||||||
"structmeta",
|
"structmeta",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3488,7 +3487,7 @@ dependencies = [
|
|||||||
"phf_shared 0.11.2",
|
"phf_shared 0.11.2",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3556,7 +3555,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4430,7 +4429,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde_derive_internals",
|
"serde_derive_internals",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4550,7 +4549,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4561,18 +4560,17 @@ checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.121"
|
version = "1.0.120"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609"
|
checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.2.6",
|
"indexmap 2.2.6",
|
||||||
"itoa 1.0.11",
|
"itoa 1.0.11",
|
||||||
"memchr",
|
|
||||||
"ryu",
|
"ryu",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@ -4595,14 +4593,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_spanned"
|
name = "serde_spanned"
|
||||||
version = "0.6.7"
|
version = "0.6.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d"
|
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@ -4616,7 +4614,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4658,7 +4656,7 @@ dependencies = [
|
|||||||
"darling",
|
"darling",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4926,7 +4924,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"structmeta-derive",
|
"structmeta-derive",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4937,7 +4935,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4959,7 +4957,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"rustversion",
|
"rustversion",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4992,9 +4990,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.72"
|
version = "2.0.71"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
|
checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -5010,7 +5008,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5027,7 +5025,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5069,7 +5067,7 @@ dependencies = [
|
|||||||
"cfg-expr",
|
"cfg-expr",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"version-compare",
|
"version-compare",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -5222,7 +5220,7 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"tauri-winres",
|
"tauri-winres",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -5244,7 +5242,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"time",
|
"time",
|
||||||
@ -5262,7 +5260,7 @@ dependencies = [
|
|||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"tauri-codegen",
|
"tauri-codegen",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
]
|
]
|
||||||
@ -5280,7 +5278,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -5564,7 +5562,7 @@ dependencies = [
|
|||||||
"serde_with",
|
"serde_with",
|
||||||
"swift-rs",
|
"swift-rs",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"toml 0.8.16",
|
"toml 0.8.14",
|
||||||
"url",
|
"url",
|
||||||
"urlpattern",
|
"urlpattern",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
@ -5620,22 +5618,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.63"
|
version = "1.0.62"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
|
checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.63"
|
version = "1.0.62"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5732,7 +5730,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5811,21 +5809,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.8.16"
|
version = "0.8.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c"
|
checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned",
|
"serde_spanned",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"toml_edit 0.22.17",
|
"toml_edit 0.22.14",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_datetime"
|
name = "toml_datetime"
|
||||||
version = "0.6.7"
|
version = "0.6.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db"
|
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@ -5867,9 +5865,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.22.17"
|
version = "0.22.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16"
|
checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.2.6",
|
"indexmap 2.2.6",
|
||||||
"serde",
|
"serde",
|
||||||
@ -5932,7 +5930,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5961,7 +5959,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -6091,7 +6089,7 @@ checksum = "c88cc88fd23b5a04528f3a8436024f20010a16ec18eb23c164b1242f65860130"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -6308,7 +6306,7 @@ dependencies = [
|
|||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -6407,7 +6405,7 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -6441,7 +6439,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
@ -6582,7 +6580,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -6688,7 +6686,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -6699,7 +6697,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -7151,7 +7149,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.72",
|
"syn 2.0.71",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -72,6 +72,7 @@ import { err, trap } from 'lib/trap'
|
|||||||
import { useCommandsContext } from 'hooks/useCommandsContext'
|
import { useCommandsContext } from 'hooks/useCommandsContext'
|
||||||
import { modelingMachineEvent } from 'editor/manager'
|
import { modelingMachineEvent } from 'editor/manager'
|
||||||
import { hasValidFilletSelection } from 'lang/modifyAst/addFillet'
|
import { hasValidFilletSelection } from 'lang/modifyAst/addFillet'
|
||||||
|
import { uuidv4 } from 'lib/utils'
|
||||||
|
|
||||||
type MachineContext<T extends AnyStateMachine> = {
|
type MachineContext<T extends AnyStateMachine> = {
|
||||||
state: StateFrom<T>
|
state: StateFrom<T>
|
||||||
|
@ -6,7 +6,11 @@ import { Selections, processCodeMirrorRanges, Selection } from 'lib/selections'
|
|||||||
import { undo, redo } from '@codemirror/commands'
|
import { undo, redo } from '@codemirror/commands'
|
||||||
import { CommandBarMachineEvent } from 'machines/commandBarMachine'
|
import { CommandBarMachineEvent } from 'machines/commandBarMachine'
|
||||||
import { addLineHighlight, addLineHighlightEvent } from './highlightextension'
|
import { addLineHighlight, addLineHighlightEvent } from './highlightextension'
|
||||||
import { Diagnostic, setDiagnosticsEffect } from '@codemirror/lint'
|
import {
|
||||||
|
forEachDiagnostic,
|
||||||
|
Diagnostic,
|
||||||
|
setDiagnosticsEffect,
|
||||||
|
} from '@codemirror/lint'
|
||||||
|
|
||||||
const updateOutsideEditorAnnotation = Annotation.define<boolean>()
|
const updateOutsideEditorAnnotation = Annotation.define<boolean>()
|
||||||
export const updateOutsideEditorEvent = updateOutsideEditorAnnotation.of(true)
|
export const updateOutsideEditorEvent = updateOutsideEditorAnnotation.of(true)
|
||||||
@ -110,20 +114,12 @@ export default class EditorManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearDiagnostics(): void {
|
||||||
|
this.setDiagnostics([])
|
||||||
|
}
|
||||||
|
|
||||||
setDiagnostics(diagnostics: Diagnostic[]): void {
|
setDiagnostics(diagnostics: Diagnostic[]): void {
|
||||||
if (!this._editorView) return
|
if (!this._editorView) return
|
||||||
// Clear out any existing diagnostics that are the same.
|
|
||||||
for (const diagnostic of diagnostics) {
|
|
||||||
for (const otherDiagnostic of diagnostics) {
|
|
||||||
if (diagnosticIsEqual(diagnostic, otherDiagnostic)) {
|
|
||||||
diagnostics = diagnostics.filter(
|
|
||||||
(d) => !diagnosticIsEqual(d, diagnostic)
|
|
||||||
)
|
|
||||||
diagnostics.push(diagnostic)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this._editorView.dispatch({
|
this._editorView.dispatch({
|
||||||
effects: [setDiagnosticsEffect.of(diagnostics)],
|
effects: [setDiagnosticsEffect.of(diagnostics)],
|
||||||
@ -135,6 +131,26 @@ export default class EditorManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addDiagnostics(diagnostics: Diagnostic[]): void {
|
||||||
|
if (!this._editorView) return
|
||||||
|
|
||||||
|
forEachDiagnostic(this._editorView.state, function (diag) {
|
||||||
|
diagnostics.push(diag)
|
||||||
|
})
|
||||||
|
|
||||||
|
const uniqueDiagnostics = new Set<Diagnostic>()
|
||||||
|
diagnostics.forEach((diagnostic) => {
|
||||||
|
for (const knownDiagnostic of uniqueDiagnostics.values()) {
|
||||||
|
if (diagnosticIsEqual(diagnostic, knownDiagnostic)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uniqueDiagnostics.add(diagnostic)
|
||||||
|
})
|
||||||
|
|
||||||
|
this.setDiagnostics([...uniqueDiagnostics])
|
||||||
|
}
|
||||||
|
|
||||||
undo() {
|
undo() {
|
||||||
if (this._editorView) {
|
if (this._editorView) {
|
||||||
undo(this._editorView)
|
undo(this._editorView)
|
||||||
|
@ -17,7 +17,6 @@ import {
|
|||||||
} from 'lang/wasm'
|
} from 'lang/wasm'
|
||||||
import { getNodeFromPath } from './queryAst'
|
import { getNodeFromPath } from './queryAst'
|
||||||
import { codeManager, editorManager, sceneInfra } from 'lib/singletons'
|
import { codeManager, editorManager, sceneInfra } from 'lib/singletons'
|
||||||
import { Diagnostic } from '@codemirror/lint'
|
|
||||||
|
|
||||||
export class KclManager {
|
export class KclManager {
|
||||||
private _ast: Program = {
|
private _ast: Program = {
|
||||||
@ -33,7 +32,6 @@ export class KclManager {
|
|||||||
}
|
}
|
||||||
private _programMemory: ProgramMemory = ProgramMemory.empty()
|
private _programMemory: ProgramMemory = ProgramMemory.empty()
|
||||||
private _logs: string[] = []
|
private _logs: string[] = []
|
||||||
private _lints: Diagnostic[] = []
|
|
||||||
private _kclErrors: KCLError[] = []
|
private _kclErrors: KCLError[] = []
|
||||||
private _isExecuting = false
|
private _isExecuting = false
|
||||||
private _wasmInitFailed = true
|
private _wasmInitFailed = true
|
||||||
@ -74,36 +72,16 @@ export class KclManager {
|
|||||||
this._logsCallBack(logs)
|
this._logsCallBack(logs)
|
||||||
}
|
}
|
||||||
|
|
||||||
get lints() {
|
|
||||||
return this._lints
|
|
||||||
}
|
|
||||||
|
|
||||||
set lints(lints) {
|
|
||||||
if (lints === this._lints) return
|
|
||||||
this._lints = lints
|
|
||||||
// Run the lints through the diagnostics.
|
|
||||||
this.kclErrors = this._kclErrors
|
|
||||||
}
|
|
||||||
|
|
||||||
get kclErrors() {
|
get kclErrors() {
|
||||||
return this._kclErrors
|
return this._kclErrors
|
||||||
}
|
}
|
||||||
set kclErrors(kclErrors) {
|
set kclErrors(kclErrors) {
|
||||||
if (kclErrors === this._kclErrors && this.lints.length === 0) return
|
|
||||||
this._kclErrors = kclErrors
|
this._kclErrors = kclErrors
|
||||||
let diagnostics = kclErrorsToDiagnostics(kclErrors)
|
let diagnostics = kclErrorsToDiagnostics(kclErrors)
|
||||||
if (this.lints.length > 0) {
|
editorManager.addDiagnostics(diagnostics)
|
||||||
diagnostics = diagnostics.concat(this.lints)
|
|
||||||
}
|
|
||||||
editorManager.setDiagnostics(diagnostics)
|
|
||||||
this._kclErrorsCallBack(kclErrors)
|
this._kclErrorsCallBack(kclErrors)
|
||||||
}
|
}
|
||||||
|
|
||||||
addKclErrors(kclErrors: KCLError[]) {
|
|
||||||
if (kclErrors.length === 0) return
|
|
||||||
this.kclErrors = this.kclErrors.concat(kclErrors)
|
|
||||||
}
|
|
||||||
|
|
||||||
get isExecuting() {
|
get isExecuting() {
|
||||||
return this._isExecuting
|
return this._isExecuting
|
||||||
}
|
}
|
||||||
@ -170,12 +148,12 @@ export class KclManager {
|
|||||||
|
|
||||||
safeParse(code: string): Program | null {
|
safeParse(code: string): Program | null {
|
||||||
const ast = parse(code)
|
const ast = parse(code)
|
||||||
this.lints = []
|
|
||||||
this.kclErrors = []
|
this.kclErrors = []
|
||||||
if (!err(ast)) return ast
|
if (!err(ast)) return ast
|
||||||
const kclerror: KCLError = ast as KCLError
|
const kclerror: KCLError = ast as KCLError
|
||||||
|
|
||||||
this.addKclErrors([kclerror])
|
console.error('error parsing code', kclerror)
|
||||||
|
this.kclErrors = [kclerror]
|
||||||
// TODO: re-eval if session should end?
|
// TODO: re-eval if session should end?
|
||||||
if (kclerror.msg === 'file is empty')
|
if (kclerror.msg === 'file is empty')
|
||||||
this.engineCommandManager?.endSession()
|
this.engineCommandManager?.endSession()
|
||||||
@ -212,15 +190,13 @@ export class KclManager {
|
|||||||
this._cancelTokens.set(currentExecutionId, false)
|
this._cancelTokens.set(currentExecutionId, false)
|
||||||
|
|
||||||
this.isExecuting = true
|
this.isExecuting = true
|
||||||
// Make sure we clear before starting again. End session will do this.
|
|
||||||
this.engineCommandManager?.endSession()
|
|
||||||
await this.ensureWasmInit()
|
await this.ensureWasmInit()
|
||||||
const { logs, errors, programMemory } = await executeAst({
|
const { logs, errors, programMemory } = await executeAst({
|
||||||
ast,
|
ast,
|
||||||
engineCommandManager: this.engineCommandManager,
|
engineCommandManager: this.engineCommandManager,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.lints = await lintAst({ ast: ast })
|
editorManager.addDiagnostics(await lintAst({ ast: ast }))
|
||||||
|
|
||||||
sceneInfra.modelingSend({ type: 'code edit during sketch' })
|
sceneInfra.modelingSend({ type: 'code edit during sketch' })
|
||||||
defaultSelectionFilter(programMemory, this.engineCommandManager)
|
defaultSelectionFilter(programMemory, this.engineCommandManager)
|
||||||
@ -252,7 +228,7 @@ export class KclManager {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.logs = logs
|
this.logs = logs
|
||||||
this.addKclErrors(errors)
|
this.kclErrors = errors
|
||||||
this.programMemory = programMemory
|
this.programMemory = programMemory
|
||||||
this.ast = { ...ast }
|
this.ast = { ...ast }
|
||||||
this._executeCallback()
|
this._executeCallback()
|
||||||
@ -296,6 +272,8 @@ export class KclManager {
|
|||||||
useFakeExecutor: true,
|
useFakeExecutor: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
editorManager.addDiagnostics(await lintAst({ ast: ast }))
|
||||||
|
|
||||||
this._logs = logs
|
this._logs = logs
|
||||||
this._kclErrors = errors
|
this._kclErrors = errors
|
||||||
this._programMemory = programMemory
|
this._programMemory = programMemory
|
||||||
@ -327,6 +305,7 @@ export class KclManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
async executeCode(zoomToFit?: boolean): Promise<void> {
|
async executeCode(zoomToFit?: boolean): Promise<void> {
|
||||||
|
console.log('[kcl/KclSingleton] executeCode')
|
||||||
const ast = this.safeParse(codeManager.code)
|
const ast = this.safeParse(codeManager.code)
|
||||||
if (!ast) {
|
if (!ast) {
|
||||||
this.clearAst()
|
this.clearAst()
|
||||||
|
@ -869,7 +869,6 @@ export function hasSketchPipeBeenExtruded(selection: Selection, ast: Program) {
|
|||||||
)
|
)
|
||||||
if (err(_varDec)) return false
|
if (err(_varDec)) return false
|
||||||
const varDec = _varDec.node
|
const varDec = _varDec.node
|
||||||
if (varDec.type !== 'VariableDeclarator') return false
|
|
||||||
let extruded = false
|
let extruded = false
|
||||||
traverse(ast as any, {
|
traverse(ast as any, {
|
||||||
enter(node) {
|
enter(node) {
|
||||||
|
@ -211,7 +211,7 @@ describe('testing addTagForSketchOnFace', () => {
|
|||||||
`
|
`
|
||||||
const code = genCode(originalLine)
|
const code = genCode(originalLine)
|
||||||
const ast = parse(code)
|
const ast = parse(code)
|
||||||
await enginelessExecutor(ast)
|
const programMemory = await enginelessExecutor(ast)
|
||||||
const sourceStart = code.indexOf(originalLine)
|
const sourceStart = code.indexOf(originalLine)
|
||||||
const sourceRange: [number, number] = [
|
const sourceRange: [number, number] = [
|
||||||
sourceStart,
|
sourceStart,
|
||||||
|
@ -290,8 +290,10 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
icon: 'line',
|
icon: 'line',
|
||||||
status: 'unavailable',
|
status: 'available',
|
||||||
disabled: (state) => true,
|
disabled: (state) =>
|
||||||
|
state.matches('Sketch no face') ||
|
||||||
|
state.matches('Sketch.Rectangle tool.Awaiting second corner'),
|
||||||
title: 'Line',
|
title: 'Line',
|
||||||
hotkey: (state) =>
|
hotkey: (state) =>
|
||||||
state.matches('Sketch.Line tool') ? ['Esc', 'L'] : 'L',
|
state.matches('Sketch.Line tool') ? ['Esc', 'L'] : 'L',
|
||||||
|
@ -86,7 +86,7 @@ export function useDemoCode() {
|
|||||||
await kclManager.executeCode(true).then(() => {
|
await kclManager.executeCode(true).then(() => {
|
||||||
kclManager.isFirstRender = false
|
kclManager.isFirstRender = false
|
||||||
})
|
})
|
||||||
await codeManager.writeToFile()
|
codeManager.writeToFile()
|
||||||
})
|
})
|
||||||
}, [editorManager.editorView])
|
}, [editorManager.editorView])
|
||||||
}
|
}
|
||||||
|
10
src/wasm-lib/Cargo.lock
generated
10
src/wasm-lib/Cargo.lock
generated
@ -718,7 +718,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive-docs"
|
name = "derive-docs"
|
||||||
version = "0.1.21"
|
version = "0.1.20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -1391,7 +1391,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
version = "0.2.3"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"approx",
|
"approx",
|
||||||
@ -1460,7 +1460,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-test-server"
|
name = "kcl-test-server"
|
||||||
version = "0.1.4"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"hyper",
|
"hyper",
|
||||||
@ -1473,9 +1473,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kittycad"
|
name = "kittycad"
|
||||||
version = "0.3.9"
|
version = "0.3.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "36b87a9cca545825ba18005c1944b8525fac28867d99984178bf22c79fb5ec25"
|
checksum = "d95daf74937915b31aa164ba7b34a5d1e0f6a82de748addd926b4dc6c2760c44"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -69,7 +69,7 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
kittycad = { version = "0.3.9", default-features = false, features = ["js", "requests"] }
|
kittycad = { version = "0.3.8", default-features = false, features = ["js", "requests"] }
|
||||||
kittycad-modeling-session = "0.1.4"
|
kittycad-modeling-session = "0.1.4"
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "derive-docs"
|
name = "derive-docs"
|
||||||
description = "A tool for generating documentation from Rust derive macros"
|
description = "A tool for generating documentation from Rust derive macros"
|
||||||
version = "0.1.21"
|
version = "0.1.20"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
|
@ -797,12 +797,6 @@ fn generate_code_block_test(fn_name: &str, code_block: &str, index: usize) -> pr
|
|||||||
|
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
|
|
||||||
// Ensure it lints.
|
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zoom to fit.
|
// Zoom to fit.
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_someFn {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_someFn {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_show {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
@ -141,11 +136,6 @@ mod test_examples_show {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_show {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -48,11 +48,6 @@ mod test_examples_my_func {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
@ -143,11 +138,6 @@ mod test_examples_my_func {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -48,11 +48,6 @@ mod test_examples_line_to {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
@ -143,11 +138,6 @@ mod test_examples_line_to {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_min {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
@ -141,11 +136,6 @@ mod test_examples_min {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_show {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_import {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_import {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_import {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -46,11 +46,6 @@ mod test_examples_show {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
ctx.run(&program, None).await.unwrap();
|
ctx.run(&program, None).await.unwrap();
|
||||||
let results = program.lint_all().unwrap();
|
|
||||||
if !results.is_empty() {
|
|
||||||
panic!("Linting failed: {:?}", results);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.engine
|
ctx.engine
|
||||||
.send_modeling_cmd(
|
.send_modeling_cmd(
|
||||||
uuid::Uuid::new_v4(),
|
uuid::Uuid::new_v4(),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-test-server"
|
name = "kcl-test-server"
|
||||||
description = "A test server for KCL"
|
description = "A test server for KCL"
|
||||||
version = "0.1.4"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
@ -28,26 +28,16 @@ pub struct ServerArgs {
|
|||||||
pub listen_on: SocketAddr,
|
pub listen_on: SocketAddr,
|
||||||
/// How many connections to establish with the engine.
|
/// How many connections to establish with the engine.
|
||||||
pub num_engine_conns: u8,
|
pub num_engine_conns: u8,
|
||||||
/// Where to find the engine.
|
|
||||||
/// If none, uses the prod engine.
|
|
||||||
/// This is useful for testing a local engine instance.
|
|
||||||
/// Overridden by the $LOCAL_ENGINE_ADDR environment variable.
|
|
||||||
pub engine_address: Option<String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ServerArgs {
|
impl ServerArgs {
|
||||||
pub fn parse(mut pargs: pico_args::Arguments) -> Result<Self, pico_args::Error> {
|
pub fn parse(mut pargs: pico_args::Arguments) -> Result<Self, pico_args::Error> {
|
||||||
let mut args = ServerArgs {
|
let args = ServerArgs {
|
||||||
listen_on: pargs
|
listen_on: pargs
|
||||||
.opt_value_from_str("--listen-on")?
|
.opt_value_from_str("--listen-on")?
|
||||||
.unwrap_or("0.0.0.0:3333".parse().unwrap()),
|
.unwrap_or("0.0.0.0:3333".parse().unwrap()),
|
||||||
num_engine_conns: pargs.opt_value_from_str("--num-engine-conns")?.unwrap_or(1),
|
num_engine_conns: pargs.opt_value_from_str("--num-engine-conns")?.unwrap_or(1),
|
||||||
engine_address: pargs.opt_value_from_str("--engine-address")?,
|
|
||||||
};
|
};
|
||||||
if let Ok(addr) = std::env::var("LOCAL_ENGINE_ADDR") {
|
|
||||||
println!("Overriding engine address via $LOCAL_ENGINE_ADDR");
|
|
||||||
args.engine_address = Some(addr);
|
|
||||||
}
|
|
||||||
println!("Config is {args:?}");
|
println!("Config is {args:?}");
|
||||||
Ok(args)
|
Ok(args)
|
||||||
}
|
}
|
||||||
@ -64,14 +54,12 @@ struct WorkerReq {
|
|||||||
/// Each worker has a connection to the engine, and accepts
|
/// Each worker has a connection to the engine, and accepts
|
||||||
/// KCL programs. When it receives one (over the mpsc channel)
|
/// KCL programs. When it receives one (over the mpsc channel)
|
||||||
/// it executes it and returns the result via a oneshot channel.
|
/// it executes it and returns the result via a oneshot channel.
|
||||||
fn start_worker(i: u8, engine_addr: Option<String>) -> mpsc::Sender<WorkerReq> {
|
fn start_worker(i: u8) -> mpsc::Sender<WorkerReq> {
|
||||||
println!("Starting worker {i}");
|
println!("Starting worker {i}");
|
||||||
// Make a work queue for this worker.
|
// Make a work queue for this worker.
|
||||||
let (tx, mut rx) = mpsc::channel(1);
|
let (tx, mut rx) = mpsc::channel(1);
|
||||||
tokio::task::spawn(async move {
|
tokio::task::spawn(async move {
|
||||||
let state = ExecutorContext::new_for_unit_test(UnitLength::Mm, engine_addr)
|
let state = ExecutorContext::new_for_unit_test(UnitLength::Mm).await.unwrap();
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
println!("Worker {i} ready");
|
println!("Worker {i} ready");
|
||||||
while let Some(req) = rx.recv().await {
|
while let Some(req) = rx.recv().await {
|
||||||
let req: WorkerReq = req;
|
let req: WorkerReq = req;
|
||||||
@ -94,11 +82,8 @@ pub async fn start_server(args: ServerArgs) -> anyhow::Result<()> {
|
|||||||
let ServerArgs {
|
let ServerArgs {
|
||||||
listen_on,
|
listen_on,
|
||||||
num_engine_conns,
|
num_engine_conns,
|
||||||
engine_address,
|
|
||||||
} = args;
|
} = args;
|
||||||
let workers: Vec<_> = (0..num_engine_conns)
|
let workers: Vec<_> = (0..num_engine_conns).map(start_worker).collect();
|
||||||
.map(|i| start_worker(i, engine_address.clone()))
|
|
||||||
.collect();
|
|
||||||
let state = Arc::new(ServerState {
|
let state = Arc::new(ServerState {
|
||||||
workers,
|
workers,
|
||||||
req_num: 0.into(),
|
req_num: 0.into(),
|
||||||
@ -166,9 +151,7 @@ async fn snapshot_endpoint(body: Bytes, state: ExecutorContext) -> Response<Body
|
|||||||
Err(e) => return bad_request(format!("Parse error: {e}")),
|
Err(e) => return bad_request(format!("Parse error: {e}")),
|
||||||
};
|
};
|
||||||
eprintln!("Executing {test_name}");
|
eprintln!("Executing {test_name}");
|
||||||
// This is a shitty source range, I don't know what else to use for it though.
|
if let Err(e) = state.reset_scene().await {
|
||||||
// There's no actual KCL associated with this reset_scene call.
|
|
||||||
if let Err(e) = state.reset_scene(kcl_lib::executor::SourceRange::default()).await {
|
|
||||||
return kcl_err(e);
|
return kcl_err(e);
|
||||||
}
|
}
|
||||||
// Let users know if the test is taking a long time.
|
// Let users know if the test is taking a long time.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
description = "KittyCAD Language implementation and tools"
|
description = "KittyCAD Language implementation and tools"
|
||||||
version = "0.2.3"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
@ -17,10 +17,9 @@ async-trait = "0.1.81"
|
|||||||
base64 = "0.22.1"
|
base64 = "0.22.1"
|
||||||
chrono = "0.4.38"
|
chrono = "0.4.38"
|
||||||
clap = { version = "4.5.11", default-features = false, optional = true }
|
clap = { version = "4.5.11", default-features = false, optional = true }
|
||||||
convert_case = "0.6.0"
|
|
||||||
dashmap = "6.0.1"
|
dashmap = "6.0.1"
|
||||||
databake = { version = "0.1.8", features = ["derive"] }
|
databake = { version = "0.1.8", features = ["derive"] }
|
||||||
derive-docs = { version = "0.1.21", path = "../derive-docs" }
|
derive-docs = { version = "0.1.20", path = "../derive-docs" }
|
||||||
form_urlencoded = "1.2.1"
|
form_urlencoded = "1.2.1"
|
||||||
futures = { version = "0.3.30" }
|
futures = { version = "0.3.30" }
|
||||||
git_rev = "0.1.0"
|
git_rev = "0.1.0"
|
||||||
@ -83,6 +82,7 @@ debug = true # Flamegraphs of benchmarks require accurate debug symbols
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
base64 = "0.22.1"
|
base64 = "0.22.1"
|
||||||
|
convert_case = "0.6.0"
|
||||||
criterion = { version = "0.5.1", features = ["async_tokio"] }
|
criterion = { version = "0.5.1", features = ["async_tokio"] }
|
||||||
expectorate = "1.1.0"
|
expectorate = "1.1.0"
|
||||||
iai = "0.1"
|
iai = "0.1"
|
||||||
|
@ -23,8 +23,8 @@ use crate::{
|
|||||||
docs::StdLibFn,
|
docs::StdLibFn,
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
executor::{
|
executor::{
|
||||||
BodyType, DynamicState, ExecutorContext, MemoryItem, Metadata, PipeInfo, ProgramMemory, SourceRange,
|
BodyType, ExecutorContext, MemoryItem, Metadata, PipeInfo, ProgramMemory, SourceRange, StatementKind,
|
||||||
StatementKind, TagEngineInfo, TagIdentifier, UserVal,
|
TagEngineInfo, TagIdentifier, UserVal,
|
||||||
},
|
},
|
||||||
parser::PIPE_OPERATOR,
|
parser::PIPE_OPERATOR,
|
||||||
std::{kcl_stdlib::KclStdLibFn, FunctionKind},
|
std::{kcl_stdlib::KclStdLibFn, FunctionKind},
|
||||||
@ -209,7 +209,6 @@ impl Program {
|
|||||||
pub fn lint_all(&self) -> Result<Vec<crate::lint::Discovered>> {
|
pub fn lint_all(&self) -> Result<Vec<crate::lint::Discovered>> {
|
||||||
let rules = vec![
|
let rules = vec![
|
||||||
crate::lint::checks::lint_variables,
|
crate::lint::checks::lint_variables,
|
||||||
crate::lint::checks::lint_object_properties,
|
|
||||||
crate::lint::checks::lint_call_expressions,
|
crate::lint::checks::lint_call_expressions,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -918,7 +917,6 @@ impl BinaryPart {
|
|||||||
pub async fn get_result(
|
pub async fn get_result(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
@ -929,16 +927,10 @@ impl BinaryPart {
|
|||||||
Ok(value.clone())
|
Ok(value.clone())
|
||||||
}
|
}
|
||||||
BinaryPart::BinaryExpression(binary_expression) => {
|
BinaryPart::BinaryExpression(binary_expression) => {
|
||||||
binary_expression
|
binary_expression.get_result(memory, pipe_info, ctx).await
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await
|
|
||||||
}
|
|
||||||
BinaryPart::CallExpression(call_expression) => {
|
|
||||||
call_expression.execute(memory, dynamic_state, pipe_info, ctx).await
|
|
||||||
}
|
|
||||||
BinaryPart::UnaryExpression(unary_expression) => {
|
|
||||||
unary_expression.get_result(memory, dynamic_state, pipe_info, ctx).await
|
|
||||||
}
|
}
|
||||||
|
BinaryPart::CallExpression(call_expression) => call_expression.execute(memory, pipe_info, ctx).await,
|
||||||
|
BinaryPart::UnaryExpression(unary_expression) => unary_expression.get_result(memory, pipe_info, ctx).await,
|
||||||
BinaryPart::MemberExpression(member_expression) => member_expression.get_result(memory),
|
BinaryPart::MemberExpression(member_expression) => member_expression.get_result(memory),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1318,7 +1310,6 @@ impl CallExpression {
|
|||||||
pub async fn execute(
|
pub async fn execute(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
@ -1331,14 +1322,7 @@ impl CallExpression {
|
|||||||
source_range: SourceRange([arg.start(), arg.end()]),
|
source_range: SourceRange([arg.start(), arg.end()]),
|
||||||
};
|
};
|
||||||
let result = ctx
|
let result = ctx
|
||||||
.arg_into_mem_item(
|
.arg_into_mem_item(arg, memory, pipe_info, &metadata, StatementKind::Expression)
|
||||||
arg,
|
|
||||||
memory,
|
|
||||||
dynamic_state,
|
|
||||||
pipe_info,
|
|
||||||
&metadata,
|
|
||||||
StatementKind::Expression,
|
|
||||||
)
|
|
||||||
.await?;
|
.await?;
|
||||||
fn_args.push(result);
|
fn_args.push(result);
|
||||||
}
|
}
|
||||||
@ -1346,8 +1330,7 @@ impl CallExpression {
|
|||||||
match ctx.stdlib.get_either(&self.callee.name) {
|
match ctx.stdlib.get_either(&self.callee.name) {
|
||||||
FunctionKind::Core(func) => {
|
FunctionKind::Core(func) => {
|
||||||
// Attempt to call the function.
|
// Attempt to call the function.
|
||||||
let args =
|
let args = crate::std::Args::new(fn_args, self.into(), ctx.clone(), memory.clone());
|
||||||
crate::std::Args::new(fn_args, self.into(), ctx.clone(), memory.clone(), dynamic_state.clone());
|
|
||||||
let mut result = func.std_lib_fn()(args).await?;
|
let mut result = func.std_lib_fn()(args).await?;
|
||||||
|
|
||||||
// If the return result is a sketch group or extrude group, we want to update the
|
// If the return result is a sketch group or extrude group, we want to update the
|
||||||
@ -1392,7 +1375,6 @@ impl CallExpression {
|
|||||||
|
|
||||||
let mut info = info.clone();
|
let mut info = info.clone();
|
||||||
info.surface = Some(value.clone());
|
info.surface = Some(value.clone());
|
||||||
info.sketch_group = extrude_group.id;
|
|
||||||
t.info = Some(info);
|
t.info = Some(info);
|
||||||
|
|
||||||
memory.update_tag(&tag.name, t.clone())?;
|
memory.update_tag(&tag.name, t.clone())?;
|
||||||
@ -1401,15 +1383,9 @@ impl CallExpression {
|
|||||||
extrude_group.sketch_group.tags.insert(tag.name.clone(), t);
|
extrude_group.sketch_group.tags.insert(tag.name.clone(), t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the stale sketch group in memory and update it.
|
|
||||||
if let Some(current_env) = memory.environments.get_mut(memory.current_env.index()) {
|
|
||||||
current_env.update_sketch_group_tags(&extrude_group.sketch_group);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
FunctionKind::Std(func) => {
|
FunctionKind::Std(func) => {
|
||||||
@ -1456,14 +1432,9 @@ impl CallExpression {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut fn_dynamic_state = dynamic_state.clone();
|
|
||||||
|
|
||||||
// Call the stdlib function
|
// Call the stdlib function
|
||||||
let p = func.function().clone().body;
|
let p = func.function().clone().body;
|
||||||
let results = match ctx
|
let results = match ctx.inner_execute(&p, &mut fn_memory, BodyType::Block).await {
|
||||||
.inner_execute(&p, &mut fn_memory, &mut fn_dynamic_state, BodyType::Block)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(results) => results,
|
Ok(results) => results,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
// We need to override the source ranges so we don't get the embedded kcl
|
// We need to override the source ranges so we don't get the embedded kcl
|
||||||
@ -1484,11 +1455,7 @@ impl CallExpression {
|
|||||||
}
|
}
|
||||||
FunctionKind::UserDefined => {
|
FunctionKind::UserDefined => {
|
||||||
let func = memory.get(&fn_name, self.into())?;
|
let func = memory.get(&fn_name, self.into())?;
|
||||||
let fn_dynamic_state = dynamic_state.merge(memory);
|
let result = func.call_fn(fn_args, ctx.clone()).await.map_err(|e| {
|
||||||
let result = func
|
|
||||||
.call_fn(fn_args, &fn_dynamic_state, ctx.clone())
|
|
||||||
.await
|
|
||||||
.map_err(|e| {
|
|
||||||
// Add the call expression to the source ranges.
|
// Add the call expression to the source ranges.
|
||||||
e.add_source_ranges(vec![self.into()])
|
e.add_source_ranges(vec![self.into()])
|
||||||
})?;
|
})?;
|
||||||
@ -2327,7 +2294,6 @@ impl ArrayExpression {
|
|||||||
pub async fn execute(
|
pub async fn execute(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
@ -2343,29 +2309,13 @@ impl ArrayExpression {
|
|||||||
value.clone()
|
value.clone()
|
||||||
}
|
}
|
||||||
Value::BinaryExpression(binary_expression) => {
|
Value::BinaryExpression(binary_expression) => {
|
||||||
binary_expression
|
binary_expression.get_result(memory, pipe_info, ctx).await?
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::CallExpression(call_expression) => {
|
|
||||||
call_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::UnaryExpression(unary_expression) => {
|
|
||||||
unary_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::ObjectExpression(object_expression) => {
|
|
||||||
object_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::ArrayExpression(array_expression) => {
|
|
||||||
array_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::PipeExpression(pipe_expression) => {
|
|
||||||
pipe_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
}
|
||||||
|
Value::CallExpression(call_expression) => call_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::UnaryExpression(unary_expression) => unary_expression.get_result(memory, pipe_info, ctx).await?,
|
||||||
|
Value::ObjectExpression(object_expression) => object_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::ArrayExpression(array_expression) => array_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::PipeExpression(pipe_expression) => pipe_expression.get_result(memory, pipe_info, ctx).await?,
|
||||||
Value::PipeSubstitution(pipe_substitution) => {
|
Value::PipeSubstitution(pipe_substitution) => {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
message: format!("PipeSubstitution not implemented here: {:?}", pipe_substitution),
|
message: format!("PipeSubstitution not implemented here: {:?}", pipe_substitution),
|
||||||
@ -2514,7 +2464,6 @@ impl ObjectExpression {
|
|||||||
pub async fn execute(
|
pub async fn execute(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
@ -2529,29 +2478,13 @@ impl ObjectExpression {
|
|||||||
value.clone()
|
value.clone()
|
||||||
}
|
}
|
||||||
Value::BinaryExpression(binary_expression) => {
|
Value::BinaryExpression(binary_expression) => {
|
||||||
binary_expression
|
binary_expression.get_result(memory, pipe_info, ctx).await?
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::CallExpression(call_expression) => {
|
|
||||||
call_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::UnaryExpression(unary_expression) => {
|
|
||||||
unary_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::ObjectExpression(object_expression) => {
|
|
||||||
object_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::ArrayExpression(array_expression) => {
|
|
||||||
array_expression.execute(memory, dynamic_state, pipe_info, ctx).await?
|
|
||||||
}
|
|
||||||
Value::PipeExpression(pipe_expression) => {
|
|
||||||
pipe_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
}
|
||||||
|
Value::CallExpression(call_expression) => call_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::UnaryExpression(unary_expression) => unary_expression.get_result(memory, pipe_info, ctx).await?,
|
||||||
|
Value::ObjectExpression(object_expression) => object_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::ArrayExpression(array_expression) => array_expression.execute(memory, pipe_info, ctx).await?,
|
||||||
|
Value::PipeExpression(pipe_expression) => pipe_expression.get_result(memory, pipe_info, ctx).await?,
|
||||||
Value::MemberExpression(member_expression) => member_expression.get_result(memory)?,
|
Value::MemberExpression(member_expression) => member_expression.get_result(memory)?,
|
||||||
Value::PipeSubstitution(pipe_substitution) => {
|
Value::PipeSubstitution(pipe_substitution) => {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
@ -3013,20 +2946,11 @@ impl BinaryExpression {
|
|||||||
pub async fn get_result(
|
pub async fn get_result(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
let left_json_value = self
|
let left_json_value = self.left.get_result(memory, pipe_info, ctx).await?.get_json_value()?;
|
||||||
.left
|
let right_json_value = self.right.get_result(memory, pipe_info, ctx).await?.get_json_value()?;
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
.get_json_value()?;
|
|
||||||
let right_json_value = self
|
|
||||||
.right
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
.get_json_value()?;
|
|
||||||
|
|
||||||
// First check if we are doing string concatenation.
|
// First check if we are doing string concatenation.
|
||||||
if self.operator == BinaryOperator::Add {
|
if self.operator == BinaryOperator::Add {
|
||||||
@ -3231,14 +3155,13 @@ impl UnaryExpression {
|
|||||||
pub async fn get_result(
|
pub async fn get_result(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
let num = parse_json_number_as_f64(
|
let num = parse_json_number_as_f64(
|
||||||
&self
|
&self
|
||||||
.argument
|
.argument
|
||||||
.get_result(memory, dynamic_state, pipe_info, ctx)
|
.get_result(memory, pipe_info, ctx)
|
||||||
.await?
|
.await?
|
||||||
.get_json_value()?,
|
.get_json_value()?,
|
||||||
self.into(),
|
self.into(),
|
||||||
@ -3409,11 +3332,10 @@ impl PipeExpression {
|
|||||||
pub async fn get_result(
|
pub async fn get_result(
|
||||||
&self,
|
&self,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
ctx: &ExecutorContext,
|
ctx: &ExecutorContext,
|
||||||
) -> Result<MemoryItem, KclError> {
|
) -> Result<MemoryItem, KclError> {
|
||||||
execute_pipe_body(memory, dynamic_state, &self.body, pipe_info, self.into(), ctx).await
|
execute_pipe_body(memory, &self.body, pipe_info, self.into(), ctx).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Rename all identifiers that have the old name to the new given name.
|
/// Rename all identifiers that have the old name to the new given name.
|
||||||
@ -3427,7 +3349,6 @@ impl PipeExpression {
|
|||||||
#[async_recursion::async_recursion]
|
#[async_recursion::async_recursion]
|
||||||
async fn execute_pipe_body(
|
async fn execute_pipe_body(
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
body: &[Value],
|
body: &[Value],
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
@ -3448,14 +3369,7 @@ async fn execute_pipe_body(
|
|||||||
source_range: SourceRange([first.start(), first.end()]),
|
source_range: SourceRange([first.start(), first.end()]),
|
||||||
};
|
};
|
||||||
let output = ctx
|
let output = ctx
|
||||||
.arg_into_mem_item(
|
.arg_into_mem_item(first, memory, pipe_info, &meta, StatementKind::Expression)
|
||||||
first,
|
|
||||||
memory,
|
|
||||||
dynamic_state,
|
|
||||||
pipe_info,
|
|
||||||
&meta,
|
|
||||||
StatementKind::Expression,
|
|
||||||
)
|
|
||||||
.await?;
|
.await?;
|
||||||
// Now that we've evaluated the first child expression in the pipeline, following child expressions
|
// Now that we've evaluated the first child expression in the pipeline, following child expressions
|
||||||
// should use the previous child expression for %.
|
// should use the previous child expression for %.
|
||||||
@ -3466,15 +3380,9 @@ async fn execute_pipe_body(
|
|||||||
for expression in body {
|
for expression in body {
|
||||||
let output = match expression {
|
let output = match expression {
|
||||||
Value::BinaryExpression(binary_expression) => {
|
Value::BinaryExpression(binary_expression) => {
|
||||||
binary_expression
|
binary_expression.get_result(memory, &new_pipe_info, ctx).await?
|
||||||
.get_result(memory, dynamic_state, &new_pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::CallExpression(call_expression) => {
|
|
||||||
call_expression
|
|
||||||
.execute(memory, dynamic_state, &new_pipe_info, ctx)
|
|
||||||
.await?
|
|
||||||
}
|
}
|
||||||
|
Value::CallExpression(call_expression) => call_expression.execute(memory, &new_pipe_info, ctx).await?,
|
||||||
Value::Identifier(identifier) => memory.get(&identifier.name, identifier.into())?.clone(),
|
Value::Identifier(identifier) => memory.get(&identifier.name, identifier.into())?.clone(),
|
||||||
_ => {
|
_ => {
|
||||||
// Return an error this should not happen.
|
// Return an error this should not happen.
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use convert_case::Casing;
|
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tower_lsp::lsp_types::{
|
use tower_lsp::lsp_types::{
|
||||||
@ -57,10 +56,7 @@ pub struct StdLibFnArg {
|
|||||||
impl StdLibFnArg {
|
impl StdLibFnArg {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn get_type_string(&self) -> Result<(String, bool)> {
|
pub fn get_type_string(&self) -> Result<(String, bool)> {
|
||||||
match get_type_string_from_schema(&self.schema.clone()) {
|
get_type_string_from_schema(&self.schema.clone())
|
||||||
Ok(r) => Ok(r),
|
|
||||||
Err(e) => anyhow::bail!("error getting type string for {}: {:#?}", self.type_, e),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_autocomplete_string(&self) -> Result<String> {
|
pub fn get_autocomplete_string(&self) -> Result<String> {
|
||||||
@ -368,13 +364,6 @@ pub fn get_type_string_from_schema(schema: &schemars::schema::Schema) -> Result<
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure none of the object properties are in snake case.
|
|
||||||
// We want the language to be consistent.
|
|
||||||
// This will fail in the docs generation and not at runtime.
|
|
||||||
if !prop_name.is_case(convert_case::Case::Camel) {
|
|
||||||
anyhow::bail!("expected camel case: {:#?}", prop_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(description) = get_description_string_from_schema(prop) {
|
if let Some(description) = get_description_string_from_schema(prop) {
|
||||||
fn_docs.push_str(&format!("\t// {}\n", description));
|
fn_docs.push_str(&format!("\t// {}\n", description));
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
) -> Result<DefaultPlanes, crate::errors::KclError>;
|
) -> Result<DefaultPlanes, crate::errors::KclError>;
|
||||||
|
|
||||||
/// Helpers to be called after clearing a scene.
|
/// Helpers to be called after clearing a scene.
|
||||||
/// (These really only apply to wasm for now).
|
/// (These really only apply to wasm for now.
|
||||||
async fn clear_scene_post_hook(
|
async fn clear_scene_post_hook(
|
||||||
&self,
|
&self,
|
||||||
source_range: crate::executor::SourceRange,
|
source_range: crate::executor::SourceRange,
|
||||||
|
@ -193,66 +193,6 @@ impl Environment {
|
|||||||
pub fn contains_key(&self, key: &str) -> bool {
|
pub fn contains_key(&self, key: &str) -> bool {
|
||||||
self.bindings.contains_key(key)
|
self.bindings.contains_key(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_sketch_group_tags(&mut self, sg: &SketchGroup) {
|
|
||||||
if sg.tags.is_empty() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (_, val) in self.bindings.iter_mut() {
|
|
||||||
if let MemoryItem::SketchGroup(ref mut sketch_group) = val {
|
|
||||||
if sketch_group.original_id == sg.original_id {
|
|
||||||
for tag in sg.tags.iter() {
|
|
||||||
sketch_group.tags.insert(tag.0.clone(), tag.1.clone());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Dynamic state that depends on the dynamic flow of the program, like the call
|
|
||||||
/// stack. If the language had exceptions, for example, you could store the
|
|
||||||
/// stack of exception handlers here.
|
|
||||||
#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, ts_rs::TS, JsonSchema)]
|
|
||||||
pub struct DynamicState {
|
|
||||||
pub extrude_group_ids: Vec<ExtrudeGroupLazyIds>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl DynamicState {
|
|
||||||
pub fn new() -> Self {
|
|
||||||
Self::default()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn merge(&self, memory: &ProgramMemory) -> Self {
|
|
||||||
let mut merged = self.clone();
|
|
||||||
merged.append(memory);
|
|
||||||
merged
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn append(&mut self, memory: &ProgramMemory) {
|
|
||||||
for env in &memory.environments {
|
|
||||||
for item in env.bindings.values() {
|
|
||||||
if let MemoryItem::ExtrudeGroup(eg) = item {
|
|
||||||
self.extrude_group_ids.push(ExtrudeGroupLazyIds::from(eg.as_ref()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn fillet_or_chamfer_ids_on_sketch_group(&self, sketch_group_id: uuid::Uuid) -> Vec<uuid::Uuid> {
|
|
||||||
self.extrude_group_ids
|
|
||||||
.iter()
|
|
||||||
.flat_map(|eg| {
|
|
||||||
if eg.sketch_group_id == sketch_group_id {
|
|
||||||
eg.fillet_or_chamfers.clone()
|
|
||||||
} else {
|
|
||||||
Vec::new()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||||
@ -683,7 +623,6 @@ pub type MemoryFunction =
|
|||||||
memory: ProgramMemory,
|
memory: ProgramMemory,
|
||||||
expression: Box<FunctionExpression>,
|
expression: Box<FunctionExpression>,
|
||||||
metadata: Vec<Metadata>,
|
metadata: Vec<Metadata>,
|
||||||
dynamic_state: DynamicState,
|
|
||||||
ctx: ExecutorContext,
|
ctx: ExecutorContext,
|
||||||
) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Option<ProgramReturn>, KclError>> + Send>>;
|
) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Option<ProgramReturn>, KclError>> + Send>>;
|
||||||
|
|
||||||
@ -693,7 +632,6 @@ fn force_memory_function<
|
|||||||
ProgramMemory,
|
ProgramMemory,
|
||||||
Box<FunctionExpression>,
|
Box<FunctionExpression>,
|
||||||
Vec<Metadata>,
|
Vec<Metadata>,
|
||||||
DynamicState,
|
|
||||||
ExecutorContext,
|
ExecutorContext,
|
||||||
) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Option<ProgramReturn>, KclError>> + Send>>,
|
) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Option<ProgramReturn>, KclError>> + Send>>,
|
||||||
>(
|
>(
|
||||||
@ -862,7 +800,6 @@ impl MemoryItem {
|
|||||||
pub async fn call_fn(
|
pub async fn call_fn(
|
||||||
&self,
|
&self,
|
||||||
args: Vec<MemoryItem>,
|
args: Vec<MemoryItem>,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
ctx: ExecutorContext,
|
ctx: ExecutorContext,
|
||||||
) -> Result<Option<ProgramReturn>, KclError> {
|
) -> Result<Option<ProgramReturn>, KclError> {
|
||||||
let MemoryItem::Function {
|
let MemoryItem::Function {
|
||||||
@ -888,7 +825,6 @@ impl MemoryItem {
|
|||||||
closure_memory.as_ref().clone(),
|
closure_memory.as_ref().clone(),
|
||||||
expression.clone(),
|
expression.clone(),
|
||||||
meta.clone(),
|
meta.clone(),
|
||||||
dynamic_state.clone(),
|
|
||||||
ctx,
|
ctx,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@ -915,7 +851,7 @@ pub struct TagEngineInfo {
|
|||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
#[serde(tag = "type", rename_all = "camelCase")]
|
#[serde(tag = "type", rename_all = "camelCase")]
|
||||||
pub struct SketchGroup {
|
pub struct SketchGroup {
|
||||||
/// The id of the sketch group (this will change when the engine's reference to it changes.
|
/// The id of the sketch group.
|
||||||
pub id: uuid::Uuid,
|
pub id: uuid::Uuid,
|
||||||
/// The paths in the sketch group.
|
/// The paths in the sketch group.
|
||||||
pub value: Vec<Path>,
|
pub value: Vec<Path>,
|
||||||
@ -926,10 +862,6 @@ pub struct SketchGroup {
|
|||||||
/// Tag identifiers that have been declared in this sketch group.
|
/// Tag identifiers that have been declared in this sketch group.
|
||||||
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
||||||
pub tags: HashMap<String, TagIdentifier>,
|
pub tags: HashMap<String, TagIdentifier>,
|
||||||
/// The original id of the sketch group. This stays the same even if the sketch group is
|
|
||||||
/// is sketched on face etc.
|
|
||||||
#[serde(skip)]
|
|
||||||
pub original_id: uuid::Uuid,
|
|
||||||
/// Metadata.
|
/// Metadata.
|
||||||
#[serde(rename = "__meta")]
|
#[serde(rename = "__meta")]
|
||||||
pub meta: Vec<Metadata>,
|
pub meta: Vec<Metadata>,
|
||||||
@ -1065,27 +997,6 @@ impl ExtrudeGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An extrude group ID and its fillet and chamfer IDs. This is needed for lazy
|
|
||||||
/// fillet evaluation.
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, ts_rs::TS, JsonSchema)]
|
|
||||||
pub struct ExtrudeGroupLazyIds {
|
|
||||||
pub extrude_group_id: uuid::Uuid,
|
|
||||||
pub sketch_group_id: uuid::Uuid,
|
|
||||||
/// Chamfers or fillets on this extrude group.
|
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
|
||||||
pub fillet_or_chamfers: Vec<uuid::Uuid>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<&ExtrudeGroup> for ExtrudeGroupLazyIds {
|
|
||||||
fn from(eg: &ExtrudeGroup) -> Self {
|
|
||||||
Self {
|
|
||||||
extrude_group_id: eg.id,
|
|
||||||
sketch_group_id: eg.sketch_group.id,
|
|
||||||
fillet_or_chamfers: eg.fillet_or_chamfers.iter().map(|foc| foc.id()).collect(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A fillet or a chamfer.
|
/// A fillet or a chamfer.
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
@ -1097,7 +1008,6 @@ pub enum FilletOrChamfer {
|
|||||||
id: uuid::Uuid,
|
id: uuid::Uuid,
|
||||||
radius: f64,
|
radius: f64,
|
||||||
/// The engine id of the edge to fillet.
|
/// The engine id of the edge to fillet.
|
||||||
#[serde(rename = "edgeId")]
|
|
||||||
edge_id: uuid::Uuid,
|
edge_id: uuid::Uuid,
|
||||||
tag: Box<Option<TagDeclarator>>,
|
tag: Box<Option<TagDeclarator>>,
|
||||||
},
|
},
|
||||||
@ -1107,7 +1017,6 @@ pub enum FilletOrChamfer {
|
|||||||
id: uuid::Uuid,
|
id: uuid::Uuid,
|
||||||
length: f64,
|
length: f64,
|
||||||
/// The engine id of the edge to chamfer.
|
/// The engine id of the edge to chamfer.
|
||||||
#[serde(rename = "edgeId")]
|
|
||||||
edge_id: uuid::Uuid,
|
edge_id: uuid::Uuid,
|
||||||
tag: Box<Option<TagDeclarator>>,
|
tag: Box<Option<TagDeclarator>>,
|
||||||
},
|
},
|
||||||
@ -1150,12 +1059,6 @@ pub enum BodyType {
|
|||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
pub struct SourceRange(#[ts(type = "[number, number]")] pub [usize; 2]);
|
pub struct SourceRange(#[ts(type = "[number, number]")] pub [usize; 2]);
|
||||||
|
|
||||||
impl From<[usize; 2]> for SourceRange {
|
|
||||||
fn from(value: [usize; 2]) -> Self {
|
|
||||||
Self(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SourceRange {
|
impl SourceRange {
|
||||||
/// Create a new source range.
|
/// Create a new source range.
|
||||||
pub fn new(start: usize, end: usize) -> Self {
|
pub fn new(start: usize, end: usize) -> Self {
|
||||||
@ -1641,8 +1544,8 @@ impl ExecutorContext {
|
|||||||
|
|
||||||
/// For executing unit tests.
|
/// For executing unit tests.
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
pub async fn new_for_unit_test(units: UnitLength, engine_addr: Option<String>) -> Result<Self> {
|
pub async fn new_for_unit_test(units: UnitLength) -> Result<Self> {
|
||||||
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"));
|
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
|
||||||
let http_client = reqwest::Client::builder()
|
let http_client = reqwest::Client::builder()
|
||||||
.user_agent(user_agent)
|
.user_agent(user_agent)
|
||||||
// For file conversions we need this to be long.
|
// For file conversions we need this to be long.
|
||||||
@ -1665,9 +1568,6 @@ impl ExecutorContext {
|
|||||||
if let Ok(addr) = std::env::var("LOCAL_ENGINE_ADDR") {
|
if let Ok(addr) = std::env::var("LOCAL_ENGINE_ADDR") {
|
||||||
client.set_base_url(addr);
|
client.set_base_url(addr);
|
||||||
}
|
}
|
||||||
if let Some(addr) = engine_addr {
|
|
||||||
client.set_base_url(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
let ctx = ExecutorContext::new(
|
let ctx = ExecutorContext::new(
|
||||||
&client,
|
&client,
|
||||||
@ -1682,8 +1582,15 @@ impl ExecutorContext {
|
|||||||
Ok(ctx)
|
Ok(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn reset_scene(&self, source_range: crate::executor::SourceRange) -> Result<()> {
|
/// Clear everything in the scene.
|
||||||
self.engine.clear_scene(source_range).await?;
|
pub async fn reset_scene(&self) -> Result<()> {
|
||||||
|
self.engine
|
||||||
|
.send_modeling_cmd(
|
||||||
|
uuid::Uuid::new_v4(),
|
||||||
|
SourceRange::default(),
|
||||||
|
kittycad::types::ModelingCmd::SceneClearAll {},
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1710,13 +1617,7 @@ impl ExecutorContext {
|
|||||||
} else {
|
} else {
|
||||||
Default::default()
|
Default::default()
|
||||||
};
|
};
|
||||||
let mut dynamic_state = DynamicState::default();
|
self.inner_execute(program, &mut memory, crate::executor::BodyType::Root)
|
||||||
self.inner_execute(
|
|
||||||
program,
|
|
||||||
&mut memory,
|
|
||||||
&mut dynamic_state,
|
|
||||||
crate::executor::BodyType::Root,
|
|
||||||
)
|
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1726,7 +1627,6 @@ impl ExecutorContext {
|
|||||||
&self,
|
&self,
|
||||||
program: &crate::ast::types::Program,
|
program: &crate::ast::types::Program,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &mut DynamicState,
|
|
||||||
body_type: BodyType,
|
body_type: BodyType,
|
||||||
) -> Result<ProgramMemory, KclError> {
|
) -> Result<ProgramMemory, KclError> {
|
||||||
let pipe_info = PipeInfo::default();
|
let pipe_info = PipeInfo::default();
|
||||||
@ -1736,9 +1636,9 @@ impl ExecutorContext {
|
|||||||
match statement {
|
match statement {
|
||||||
BodyItem::ExpressionStatement(expression_statement) => {
|
BodyItem::ExpressionStatement(expression_statement) => {
|
||||||
if let Value::PipeExpression(pipe_expr) = &expression_statement.expression {
|
if let Value::PipeExpression(pipe_expr) = &expression_statement.expression {
|
||||||
pipe_expr.get_result(memory, dynamic_state, &pipe_info, self).await?;
|
pipe_expr.get_result(memory, &pipe_info, self).await?;
|
||||||
} else if let Value::CallExpression(call_expr) = &expression_statement.expression {
|
} else if let Value::CallExpression(call_expr) = &expression_statement.expression {
|
||||||
call_expr.execute(memory, dynamic_state, &pipe_info, self).await?;
|
call_expr.execute(memory, &pipe_info, self).await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BodyItem::VariableDeclaration(variable_declaration) => {
|
BodyItem::VariableDeclaration(variable_declaration) => {
|
||||||
@ -1751,7 +1651,6 @@ impl ExecutorContext {
|
|||||||
.arg_into_mem_item(
|
.arg_into_mem_item(
|
||||||
&declaration.init,
|
&declaration.init,
|
||||||
memory,
|
memory,
|
||||||
dynamic_state,
|
|
||||||
&pipe_info,
|
&pipe_info,
|
||||||
&metadata,
|
&metadata,
|
||||||
StatementKind::Declaration { name: &var_name },
|
StatementKind::Declaration { name: &var_name },
|
||||||
@ -1762,11 +1661,11 @@ impl ExecutorContext {
|
|||||||
}
|
}
|
||||||
BodyItem::ReturnStatement(return_statement) => match &return_statement.argument {
|
BodyItem::ReturnStatement(return_statement) => match &return_statement.argument {
|
||||||
Value::BinaryExpression(bin_expr) => {
|
Value::BinaryExpression(bin_expr) => {
|
||||||
let result = bin_expr.get_result(memory, dynamic_state, &pipe_info, self).await?;
|
let result = bin_expr.get_result(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::UnaryExpression(unary_expr) => {
|
Value::UnaryExpression(unary_expr) => {
|
||||||
let result = unary_expr.get_result(memory, dynamic_state, &pipe_info, self).await?;
|
let result = unary_expr.get_result(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::Identifier(identifier) => {
|
Value::Identifier(identifier) => {
|
||||||
@ -1780,15 +1679,15 @@ impl ExecutorContext {
|
|||||||
memory.return_ = Some(ProgramReturn::Value(tag.into()));
|
memory.return_ = Some(ProgramReturn::Value(tag.into()));
|
||||||
}
|
}
|
||||||
Value::ArrayExpression(array_expr) => {
|
Value::ArrayExpression(array_expr) => {
|
||||||
let result = array_expr.execute(memory, dynamic_state, &pipe_info, self).await?;
|
let result = array_expr.execute(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::ObjectExpression(obj_expr) => {
|
Value::ObjectExpression(obj_expr) => {
|
||||||
let result = obj_expr.execute(memory, dynamic_state, &pipe_info, self).await?;
|
let result = obj_expr.execute(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::CallExpression(call_expr) => {
|
Value::CallExpression(call_expr) => {
|
||||||
let result = call_expr.execute(memory, dynamic_state, &pipe_info, self).await?;
|
let result = call_expr.execute(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::MemberExpression(member_expr) => {
|
Value::MemberExpression(member_expr) => {
|
||||||
@ -1796,7 +1695,7 @@ impl ExecutorContext {
|
|||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::PipeExpression(pipe_expr) => {
|
Value::PipeExpression(pipe_expr) => {
|
||||||
let result = pipe_expr.get_result(memory, dynamic_state, &pipe_info, self).await?;
|
let result = pipe_expr.get_result(memory, &pipe_info, self).await?;
|
||||||
memory.return_ = Some(ProgramReturn::Value(result));
|
memory.return_ = Some(ProgramReturn::Value(result));
|
||||||
}
|
}
|
||||||
Value::PipeSubstitution(_) => {}
|
Value::PipeSubstitution(_) => {}
|
||||||
@ -1827,7 +1726,6 @@ impl ExecutorContext {
|
|||||||
&self,
|
&self,
|
||||||
init: &Value,
|
init: &Value,
|
||||||
memory: &mut ProgramMemory,
|
memory: &mut ProgramMemory,
|
||||||
dynamic_state: &DynamicState,
|
|
||||||
pipe_info: &PipeInfo,
|
pipe_info: &PipeInfo,
|
||||||
metadata: &Metadata,
|
metadata: &Metadata,
|
||||||
statement_kind: StatementKind<'a>,
|
statement_kind: StatementKind<'a>,
|
||||||
@ -1840,18 +1738,13 @@ impl ExecutorContext {
|
|||||||
let value = memory.get(&identifier.name, identifier.into())?;
|
let value = memory.get(&identifier.name, identifier.into())?;
|
||||||
value.clone()
|
value.clone()
|
||||||
}
|
}
|
||||||
Value::BinaryExpression(binary_expression) => {
|
Value::BinaryExpression(binary_expression) => binary_expression.get_result(memory, pipe_info, self).await?,
|
||||||
binary_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, self)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::FunctionExpression(function_expression) => {
|
Value::FunctionExpression(function_expression) => {
|
||||||
let mem_func = force_memory_function(
|
let mem_func = force_memory_function(
|
||||||
|args: Vec<MemoryItem>,
|
|args: Vec<MemoryItem>,
|
||||||
memory: ProgramMemory,
|
memory: ProgramMemory,
|
||||||
function_expression: Box<FunctionExpression>,
|
function_expression: Box<FunctionExpression>,
|
||||||
_metadata: Vec<Metadata>,
|
_metadata: Vec<Metadata>,
|
||||||
mut dynamic_state: DynamicState,
|
|
||||||
ctx: ExecutorContext| {
|
ctx: ExecutorContext| {
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
// Create a new environment to execute the function
|
// Create a new environment to execute the function
|
||||||
@ -1865,12 +1758,7 @@ impl ExecutorContext {
|
|||||||
let mut fn_memory = assign_args_to_params(&function_expression, args, body_memory)?;
|
let mut fn_memory = assign_args_to_params(&function_expression, args, body_memory)?;
|
||||||
|
|
||||||
let result = ctx
|
let result = ctx
|
||||||
.inner_execute(
|
.inner_execute(&function_expression.body, &mut fn_memory, BodyType::Block)
|
||||||
&function_expression.body,
|
|
||||||
&mut fn_memory,
|
|
||||||
&mut dynamic_state,
|
|
||||||
BodyType::Block,
|
|
||||||
)
|
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
Ok(result.return_)
|
Ok(result.return_)
|
||||||
@ -1887,14 +1775,8 @@ impl ExecutorContext {
|
|||||||
memory: Box::new(memory.clone()),
|
memory: Box::new(memory.clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Value::CallExpression(call_expression) => {
|
Value::CallExpression(call_expression) => call_expression.execute(memory, pipe_info, self).await?,
|
||||||
call_expression.execute(memory, dynamic_state, pipe_info, self).await?
|
Value::PipeExpression(pipe_expression) => pipe_expression.get_result(memory, pipe_info, self).await?,
|
||||||
}
|
|
||||||
Value::PipeExpression(pipe_expression) => {
|
|
||||||
pipe_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, self)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::PipeSubstitution(pipe_substitution) => match statement_kind {
|
Value::PipeSubstitution(pipe_substitution) => match statement_kind {
|
||||||
StatementKind::Declaration { name } => {
|
StatementKind::Declaration { name } => {
|
||||||
let message = format!(
|
let message = format!(
|
||||||
@ -1916,20 +1798,10 @@ impl ExecutorContext {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Value::ArrayExpression(array_expression) => {
|
Value::ArrayExpression(array_expression) => array_expression.execute(memory, pipe_info, self).await?,
|
||||||
array_expression.execute(memory, dynamic_state, pipe_info, self).await?
|
Value::ObjectExpression(object_expression) => object_expression.execute(memory, pipe_info, self).await?,
|
||||||
}
|
|
||||||
Value::ObjectExpression(object_expression) => {
|
|
||||||
object_expression
|
|
||||||
.execute(memory, dynamic_state, pipe_info, self)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
Value::MemberExpression(member_expression) => member_expression.get_result(memory)?,
|
Value::MemberExpression(member_expression) => member_expression.get_result(memory)?,
|
||||||
Value::UnaryExpression(unary_expression) => {
|
Value::UnaryExpression(unary_expression) => unary_expression.get_result(memory, pipe_info, self).await?,
|
||||||
unary_expression
|
|
||||||
.get_result(memory, dynamic_state, pipe_info, self)
|
|
||||||
.await?
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
Ok(item)
|
Ok(item)
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,13 @@ use schemars::JsonSchema;
|
|||||||
use crate::{
|
use crate::{
|
||||||
ast::types::FunctionExpression,
|
ast::types::FunctionExpression,
|
||||||
errors::KclError,
|
errors::KclError,
|
||||||
executor::{DynamicState, ExecutorContext, MemoryFunction, MemoryItem, Metadata, ProgramMemory, ProgramReturn},
|
executor::{ExecutorContext, MemoryFunction, MemoryItem, Metadata, ProgramMemory, ProgramReturn},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A function being used as a parameter into a stdlib function.
|
/// A function being used as a parameter into a stdlib function.
|
||||||
pub struct FunctionParam<'a> {
|
pub struct FunctionParam<'a> {
|
||||||
pub inner: &'a MemoryFunction,
|
pub inner: &'a MemoryFunction,
|
||||||
pub memory: ProgramMemory,
|
pub memory: ProgramMemory,
|
||||||
pub dynamic_state: DynamicState,
|
|
||||||
pub fn_expr: Box<FunctionExpression>,
|
pub fn_expr: Box<FunctionExpression>,
|
||||||
pub meta: Vec<Metadata>,
|
pub meta: Vec<Metadata>,
|
||||||
pub ctx: ExecutorContext,
|
pub ctx: ExecutorContext,
|
||||||
@ -23,7 +22,6 @@ impl<'a> FunctionParam<'a> {
|
|||||||
self.memory.clone(),
|
self.memory.clone(),
|
||||||
self.fn_expr.clone(),
|
self.fn_expr.clone(),
|
||||||
self.meta.clone(),
|
self.meta.clone(),
|
||||||
self.dynamic_state.clone(),
|
|
||||||
self.ctx.clone(),
|
self.ctx.clone(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use convert_case::Casing;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::types::{ObjectProperty, VariableDeclarator},
|
ast::types::VariableDeclarator,
|
||||||
executor::SourceRange,
|
executor::SourceRange,
|
||||||
lint::rule::{def_finding, Discovered, Finding},
|
lint::rule::{def_finding, Discovered, Finding},
|
||||||
walk::Node,
|
walk::Node,
|
||||||
@ -23,25 +22,17 @@ https://en.wikipedia.org/wiki/Camel_case
|
|||||||
"
|
"
|
||||||
);
|
);
|
||||||
|
|
||||||
fn lint_lower_camel_case_var(decl: &VariableDeclarator) -> Result<Vec<Discovered>> {
|
fn lint_lower_camel_case(decl: &VariableDeclarator) -> Result<Vec<Discovered>> {
|
||||||
let mut findings = vec![];
|
let mut findings = vec![];
|
||||||
let ident = &decl.id;
|
let ident = &decl.id;
|
||||||
let name = &ident.name;
|
let name = &ident.name;
|
||||||
|
|
||||||
if !name.is_case(convert_case::Case::Camel) {
|
if !name.chars().next().unwrap().is_lowercase() {
|
||||||
findings.push(Z0001.at(format!("found '{}'", name), SourceRange::new(ident.start, ident.end)));
|
findings.push(Z0001.at(format!("found '{}'", name), SourceRange::new(ident.start, ident.end)));
|
||||||
return Ok(findings);
|
return Ok(findings);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(findings)
|
if name.contains('-') || name.contains('_') {
|
||||||
}
|
|
||||||
|
|
||||||
fn lint_lower_camel_case_property(decl: &ObjectProperty) -> Result<Vec<Discovered>> {
|
|
||||||
let mut findings = vec![];
|
|
||||||
let ident = &decl.key;
|
|
||||||
let name = &ident.name;
|
|
||||||
|
|
||||||
if !name.is_case(convert_case::Case::Camel) {
|
|
||||||
findings.push(Z0001.at(format!("found '{}'", name), SourceRange::new(ident.start, ident.end)));
|
findings.push(Z0001.at(format!("found '{}'", name), SourceRange::new(ident.start, ident.end)));
|
||||||
return Ok(findings);
|
return Ok(findings);
|
||||||
}
|
}
|
||||||
@ -57,25 +48,13 @@ pub fn lint_variables(decl: Node) -> Result<Vec<Discovered>> {
|
|||||||
Ok(decl
|
Ok(decl
|
||||||
.declarations
|
.declarations
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|v| lint_lower_camel_case_var(v).unwrap_or_default())
|
.flat_map(|v| lint_lower_camel_case(v).unwrap_or_default())
|
||||||
.collect())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn lint_object_properties(decl: Node) -> Result<Vec<Discovered>> {
|
|
||||||
let Node::ObjectExpression(decl) = decl else {
|
|
||||||
return Ok(vec![]);
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok(decl
|
|
||||||
.properties
|
|
||||||
.iter()
|
|
||||||
.flat_map(|v| lint_lower_camel_case_property(v).unwrap_or_default())
|
|
||||||
.collect())
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{lint_object_properties, lint_variables, Z0001};
|
use super::{lint_variables, Z0001};
|
||||||
use crate::lint::rule::{assert_finding, test_finding, test_no_finding};
|
use crate::lint::rule::{assert_finding, test_finding, test_no_finding};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -155,15 +134,6 @@ const part001 = startSketchOn('XY')
|
|||||||
|> angledLineToX({ angle: 60, to: pipeLargeDia }, %)
|
|> angledLineToX({ angle: 60, to: pipeLargeDia }, %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> revolve({ axis: 'y' }, %)
|
|> revolve({ axis: 'y' }, %)
|
||||||
"
|
|
||||||
);
|
|
||||||
|
|
||||||
test_finding!(
|
|
||||||
z0001_full_bad_object,
|
|
||||||
lint_object_properties,
|
|
||||||
Z0001,
|
|
||||||
"\
|
|
||||||
let circ = {angle_start: 0, angle_end: 360, radius: radius}
|
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,5 @@ mod camel_case;
|
|||||||
mod std_lib_args;
|
mod std_lib_args;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
pub use camel_case::{lint_object_properties, lint_variables, Z0001};
|
pub use camel_case::{lint_variables, Z0001};
|
||||||
pub use std_lib_args::{lint_call_expressions, Z0002};
|
pub use std_lib_args::{lint_call_expressions, Z0002};
|
||||||
|
@ -21,26 +21,6 @@ Previously, we have not been failing when too many arguments are passed to a std
|
|||||||
fn lint_too_many_args_std_lib_function(f: Box<dyn StdLibFn>, exp: &CallExpression) -> Result<Vec<Discovered>> {
|
fn lint_too_many_args_std_lib_function(f: Box<dyn StdLibFn>, exp: &CallExpression) -> Result<Vec<Discovered>> {
|
||||||
let mut findings = vec![];
|
let mut findings = vec![];
|
||||||
|
|
||||||
if f.name() == "pow" {
|
|
||||||
if exp.arguments.len() != 2 {
|
|
||||||
findings.push(Z0002.at(
|
|
||||||
format!("expected 2 arguments, found {}", exp.arguments.len()),
|
|
||||||
SourceRange::new(exp.start, exp.end),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
return Ok(findings);
|
|
||||||
}
|
|
||||||
|
|
||||||
if f.name() == "max" || f.name() == "min" {
|
|
||||||
if exp.arguments.len() < 2 {
|
|
||||||
findings.push(Z0002.at(
|
|
||||||
format!("expected at least 2 arguments, found {}", exp.arguments.len()),
|
|
||||||
SourceRange::new(exp.start, exp.end),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
return Ok(findings);
|
|
||||||
}
|
|
||||||
|
|
||||||
if exp.arguments.len() > f.args().len() {
|
if exp.arguments.len() > f.args().len() {
|
||||||
findings.push(Z0002.at(
|
findings.push(Z0002.at(
|
||||||
format!("expected {} arguments, found {}", f.args().len(), exp.arguments.len()),
|
format!("expected {} arguments, found {}", f.args().len(), exp.arguments.len()),
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
use std::any::type_name;
|
use std::any::type_name;
|
||||||
|
|
||||||
use kittycad::types::OkWebSocketResponseData;
|
|
||||||
use serde::de::DeserializeOwned;
|
|
||||||
|
|
||||||
use super::{shapes::SketchSurfaceOrGroup, sketch::FaceTag, FnAsArg};
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::types::{parse_json_number_as_f64, TagDeclarator},
|
ast::types::{parse_json_number_as_f64, TagDeclarator},
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
executor::{
|
executor::{
|
||||||
DynamicState, ExecutorContext, ExtrudeGroup, ExtrudeGroupSet, ExtrudeSurface, MemoryItem, Metadata,
|
ExecutorContext, ExtrudeGroup, ExtrudeGroupSet, ExtrudeSurface, MemoryItem, Metadata, ProgramMemory,
|
||||||
ProgramMemory, SketchGroup, SketchGroupSet, SketchSurface, SourceRange, TagIdentifier,
|
SketchGroup, SketchGroupSet, SketchSurface, SourceRange, TagIdentifier,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use kittycad::types::OkWebSocketResponseData;
|
||||||
|
use serde::de::DeserializeOwned;
|
||||||
|
|
||||||
|
use super::{shapes::SketchSurfaceOrGroup, sketch::FaceTag, FnAsArg};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
@ -19,7 +19,6 @@ pub struct Args {
|
|||||||
pub source_range: SourceRange,
|
pub source_range: SourceRange,
|
||||||
pub ctx: ExecutorContext,
|
pub ctx: ExecutorContext,
|
||||||
pub current_program_memory: ProgramMemory,
|
pub current_program_memory: ProgramMemory,
|
||||||
pub dynamic_state: DynamicState,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Args {
|
impl Args {
|
||||||
@ -28,14 +27,12 @@ impl Args {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
ctx: ExecutorContext,
|
ctx: ExecutorContext,
|
||||||
current_program_memory: ProgramMemory,
|
current_program_memory: ProgramMemory,
|
||||||
dynamic_state: DynamicState,
|
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
args,
|
args,
|
||||||
source_range,
|
source_range,
|
||||||
ctx,
|
ctx,
|
||||||
current_program_memory,
|
current_program_memory,
|
||||||
dynamic_state,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,10 +130,6 @@ impl Args {
|
|||||||
.iter()
|
.iter()
|
||||||
.flat_map(|eg| eg.get_all_fillet_or_chamfer_ids()),
|
.flat_map(|eg| eg.get_all_fillet_or_chamfer_ids()),
|
||||||
);
|
);
|
||||||
ids.extend(
|
|
||||||
self.dynamic_state
|
|
||||||
.fillet_or_chamfer_ids_on_sketch_group(sketch_group_id),
|
|
||||||
);
|
|
||||||
traversed_sketch_groups.push(sketch_group_id);
|
traversed_sketch_groups.push(sketch_group_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ pub async fn extrude(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
/// |> line([10, 0], %)
|
/// |> line([10, 0], %)
|
||||||
/// |> arc({
|
/// |> arc({
|
||||||
/// angleStart: 120,
|
/// angle_end: 0,
|
||||||
/// angleEnd: 0,
|
/// angle_start: 120,
|
||||||
/// radius: 5,
|
/// radius: 5,
|
||||||
/// }, %)
|
/// }, %)
|
||||||
/// |> line([5, 0], %)
|
/// |> line([5, 0], %)
|
||||||
@ -50,8 +50,8 @@ pub async fn extrude(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
/// const exampleSketch = startSketchOn('XZ')
|
/// const exampleSketch = startSketchOn('XZ')
|
||||||
/// |> startProfileAt([-10, 0], %)
|
/// |> startProfileAt([-10, 0], %)
|
||||||
/// |> arc({
|
/// |> arc({
|
||||||
/// angleStart: 120,
|
/// angle_end: -60,
|
||||||
/// angleEnd: -60,
|
/// angle_start: 120,
|
||||||
/// radius: 5,
|
/// radius: 5,
|
||||||
/// }, %)
|
/// }, %)
|
||||||
/// |> line([10, 0], %)
|
/// |> line([10, 0], %)
|
||||||
|
@ -19,7 +19,6 @@ pub struct HelixData {
|
|||||||
/// Number of revolutions.
|
/// Number of revolutions.
|
||||||
pub revolutions: f64,
|
pub revolutions: f64,
|
||||||
/// Start angle (in degrees).
|
/// Start angle (in degrees).
|
||||||
#[serde(rename = "angleStart", alias = "angle_start")]
|
|
||||||
pub angle_start: f64,
|
pub angle_start: f64,
|
||||||
/// Is the helix rotation counter clockwise?
|
/// Is the helix rotation counter clockwise?
|
||||||
/// The default is `false`.
|
/// The default is `false`.
|
||||||
@ -45,9 +44,10 @@ pub async fn helix(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
/// |> circle([5, 5], 10, %)
|
/// |> circle([5, 5], 10, %)
|
||||||
/// |> extrude(10, %)
|
/// |> extrude(10, %)
|
||||||
/// |> helix({
|
/// |> helix({
|
||||||
/// angleStart: 0,
|
/// angle_start: 0,
|
||||||
/// ccw: true,
|
/// ccw: true,
|
||||||
/// revolutions: 16,
|
/// revolutions: 16,
|
||||||
|
/// angle_start: 0
|
||||||
/// }, %)
|
/// }, %)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
|
@ -23,7 +23,6 @@ pub mod utils;
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
pub use args::Args;
|
|
||||||
use derive_docs::stdlib;
|
use derive_docs::stdlib;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use parse_display::{Display, FromStr};
|
use parse_display::{Display, FromStr};
|
||||||
@ -37,6 +36,7 @@ use crate::{
|
|||||||
executor::{MemoryItem, ProgramMemory, SketchGroup, SketchSurface},
|
executor::{MemoryItem, ProgramMemory, SketchGroup, SketchSurface},
|
||||||
std::kcl_stdlib::KclStdLibFn,
|
std::kcl_stdlib::KclStdLibFn,
|
||||||
};
|
};
|
||||||
|
pub use args::Args;
|
||||||
|
|
||||||
pub type StdFn = fn(Args) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<MemoryItem, KclError>> + Send>>;
|
pub type StdFn = fn(Args) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<MemoryItem, KclError>> + Send>>;
|
||||||
|
|
||||||
|
@ -88,7 +88,6 @@ pub async fn pattern_transform(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
meta: vec![args.source_range.into()],
|
meta: vec![args.source_range.into()],
|
||||||
ctx: args.ctx.clone(),
|
ctx: args.ctx.clone(),
|
||||||
memory: *transform.memory,
|
memory: *transform.memory,
|
||||||
dynamic_state: args.dynamic_state.clone(),
|
|
||||||
},
|
},
|
||||||
extr,
|
extr,
|
||||||
&args,
|
&args,
|
||||||
|
@ -902,13 +902,10 @@ pub enum PlaneData {
|
|||||||
/// Origin of the plane.
|
/// Origin of the plane.
|
||||||
origin: Box<Point3d>,
|
origin: Box<Point3d>,
|
||||||
/// What should the plane’s X axis be?
|
/// What should the plane’s X axis be?
|
||||||
#[serde(rename = "xAxis", alias = "x_axis")]
|
|
||||||
x_axis: Box<Point3d>,
|
x_axis: Box<Point3d>,
|
||||||
/// What should the plane’s Y axis be?
|
/// What should the plane’s Y axis be?
|
||||||
#[serde(rename = "yAxis", alias = "y_axis")]
|
|
||||||
y_axis: Box<Point3d>,
|
y_axis: Box<Point3d>,
|
||||||
/// The z-axis (normal).
|
/// The z-axis (normal).
|
||||||
#[serde(rename = "zAxis", alias = "z_axis")]
|
|
||||||
z_axis: Box<Point3d>,
|
z_axis: Box<Point3d>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -1087,9 +1084,9 @@ pub async fn start_sketch_on(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
/// const a1 = startSketchOn({
|
/// const a1 = startSketchOn({
|
||||||
/// plane: {
|
/// plane: {
|
||||||
/// origin: { x: 0, y: 0, z: 0 },
|
/// origin: { x: 0, y: 0, z: 0 },
|
||||||
/// xAxis: { x: 1, y: 0, z: 0 },
|
/// x_axis: { x: 1, y: 0, z: 0 },
|
||||||
/// yAxis: { x: 0, y: 1, z: 0 },
|
/// y_axis: { x: 0, y: 1, z: 0 },
|
||||||
/// zAxis: { x: 0, y: 0, z: 1 }
|
/// z_axis: { x: 0, y: 0, z: 1 }
|
||||||
/// }
|
/// }
|
||||||
/// })
|
/// })
|
||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
@ -1290,7 +1287,6 @@ pub(crate) async fn inner_start_profile_at(
|
|||||||
|
|
||||||
let sketch_group = SketchGroup {
|
let sketch_group = SketchGroup {
|
||||||
id: path_id,
|
id: path_id,
|
||||||
original_id: path_id,
|
|
||||||
on: sketch_surface.clone(),
|
on: sketch_surface.clone(),
|
||||||
value: vec![],
|
value: vec![],
|
||||||
meta: vec![args.source_range.into()],
|
meta: vec![args.source_range.into()],
|
||||||
@ -1470,10 +1466,8 @@ pub enum ArcData {
|
|||||||
/// Angles and radius with an optional tag.
|
/// Angles and radius with an optional tag.
|
||||||
AnglesAndRadius {
|
AnglesAndRadius {
|
||||||
/// The start angle.
|
/// The start angle.
|
||||||
#[serde(rename = "angleStart", alias = "angle_start")]
|
|
||||||
angle_start: f64,
|
angle_start: f64,
|
||||||
/// The end angle.
|
/// The end angle.
|
||||||
#[serde(rename = "angleEnd", alias = "angle_end")]
|
|
||||||
angle_end: f64,
|
angle_end: f64,
|
||||||
/// The radius.
|
/// The radius.
|
||||||
radius: f64,
|
radius: f64,
|
||||||
@ -1505,8 +1499,8 @@ pub async fn arc(args: Args) -> Result<MemoryItem, KclError> {
|
|||||||
/// |> startProfileAt([0, 0], %)
|
/// |> startProfileAt([0, 0], %)
|
||||||
/// |> line([10, 0], %)
|
/// |> line([10, 0], %)
|
||||||
/// |> arc({
|
/// |> arc({
|
||||||
/// angleStart: 0,
|
/// angle_start: 0,
|
||||||
/// angleEnd: 280,
|
/// angle_end: 280,
|
||||||
/// radius: 16
|
/// radius: 16
|
||||||
/// }, %)
|
/// }, %)
|
||||||
/// |> close(%)
|
/// |> close(%)
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%, $thing3)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 2, tags: [thing3, getOppositeEdge(thing3)]}, %)
|
|
@ -1,8 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 2, tags: [thing, getOppositeEdge(thing)]}, %)
|
|
@ -1,8 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %, $thing1)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%, $thing3)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 2, tags: [getNextAdjacentEdge(thing3)]}, %)
|
|
@ -1,8 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %, $thing1)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%, $thing3)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 2, tags: [getPreviousAdjacentEdge(thing3)]}, %)
|
|
@ -1,9 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 2, tags: [thing, thing2]}, %)
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, 10], %, $thing)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %, $thing2)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(10, %)
|
|
||||||
|> fillet({radius: 0.5, tags: [thing, thing]}, %)
|
|
@ -1,13 +0,0 @@
|
|||||||
fn box = (h, l, w) => {
|
|
||||||
const myBox = startSketchOn('XY')
|
|
||||||
|> startProfileAt([0,0], %)
|
|
||||||
|> line([0, l], %)
|
|
||||||
|> line([w, 0], %)
|
|
||||||
|> line([0, -l], %)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(h, %)
|
|
||||||
|
|
||||||
return myBox
|
|
||||||
}
|
|
||||||
|
|
||||||
const fnBox = box(3, 6, 10)
|
|
@ -1,13 +0,0 @@
|
|||||||
fn box = (p, h, l, w) => {
|
|
||||||
const myBox = startSketchOn('XY')
|
|
||||||
|> startProfileAt(p, %)
|
|
||||||
|> line([0, l], %)
|
|
||||||
|> line([w, 0], %)
|
|
||||||
|> line([0, -l], %)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(h, %)
|
|
||||||
|
|
||||||
return myBox
|
|
||||||
}
|
|
||||||
|
|
||||||
const thing = box([0,0], 3, 6, 10)
|
|
@ -1,15 +0,0 @@
|
|||||||
const part001 = startSketchOn('XY')
|
|
||||||
|> startProfileAt([11.19, 28.35], %)
|
|
||||||
|> line([28.67, -13.25], %, $here)
|
|
||||||
|> line([-4.12, -22.81], %)
|
|
||||||
|> line([-33.24, 14.55], %)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(5, %)
|
|
||||||
|
|
||||||
const part002 = startSketchOn(part001, here)
|
|
||||||
|> startProfileAt([0, 0], %)
|
|
||||||
|> line([0, 10], %)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(5, %)
|
|
@ -1,20 +0,0 @@
|
|||||||
fn cube = (pos, scale) => {
|
|
||||||
const sg = startSketchOn('XY')
|
|
||||||
|> startProfileAt(pos, %)
|
|
||||||
|> line([0, scale], %)
|
|
||||||
|> line([scale, 0], %)
|
|
||||||
|> line([0, -scale], %)
|
|
||||||
|
|
||||||
return sg
|
|
||||||
}
|
|
||||||
const part001 = cube([0,0], 20)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(20, %)
|
|
||||||
|
|
||||||
const part002 = startSketchOn(part001, "END")
|
|
||||||
|> startProfileAt([0, 0], %)
|
|
||||||
|> line([0, 10], %)
|
|
||||||
|> line([10, 0], %)
|
|
||||||
|> line([0, -10], %)
|
|
||||||
|> close(%)
|
|
||||||
|> extrude(5, %)
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user