Merge branch 'main' into pierremtb/issue2610
							
								
								
									
										10
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						| @ -4,7 +4,8 @@ | ||||
|       "project": "./tsconfig.json" | ||||
|     }, | ||||
|     "plugins": [ | ||||
|       "css-modules" | ||||
|       "css-modules", | ||||
|       "suggest-no-throw", | ||||
|     ], | ||||
|     "extends": [ | ||||
|       "react-app", | ||||
| @ -17,6 +18,7 @@ | ||||
|         "never" | ||||
|       ], | ||||
|       "react-hooks/exhaustive-deps": "off", | ||||
|       "suggest-no-throw/suggest-no-throw": "warn", | ||||
|     }, | ||||
|     "overrides": [ | ||||
|       { | ||||
| @ -25,6 +27,12 @@ | ||||
|           "@typescript-eslint/no-floating-promises": "warn", | ||||
|           "testing-library/prefer-screen-queries": "off" | ||||
|         } | ||||
|       }, | ||||
|       { | ||||
|         "files": ["src/**/*.test.ts"], | ||||
|         "rules": { | ||||
|           "suggest-no-throw/suggest-no-throw": "off", | ||||
|         } | ||||
|       } | ||||
|     ] | ||||
| } | ||||
|  | ||||
							
								
								
									
										4
									
								
								.github/workflows/cargo-bench.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -38,5 +38,7 @@ jobs: | ||||
|       - name: Benchmark kcl library | ||||
|         shell: bash | ||||
|         run: |- | ||||
|           cd src/wasm-lib/kcl; cargo bench -- iai | ||||
|           cd src/wasm-lib/kcl; cargo bench --all-features -- iai | ||||
|         env: | ||||
|           KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} | ||||
|  | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -240,12 +240,8 @@ jobs: | ||||
|         shell: cmd | ||||
|  | ||||
|       - name: Build the app (debug) | ||||
|         uses: tauri-apps/tauri-action@v0 | ||||
|         if: ${{ env.BUILD_RELEASE == 'false' }} | ||||
|         with: | ||||
|           includeRelease: false | ||||
|           includeDebug: true | ||||
|           args: "${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|         run: "yarn tauri build --debug ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|  | ||||
|       - name: Build for Mac TestFlight (nightly) | ||||
|         if: ${{ github.event_name == 'schedule' && matrix.os == 'macos-14' }} | ||||
| @ -338,7 +334,6 @@ jobs: | ||||
|       # specific and we want to overwrite it with the this new build after and | ||||
|       # not upload the apple store build to the public bucket | ||||
|       - name: Build the app (release) and sign | ||||
|         uses: tauri-apps/tauri-action@v0 | ||||
|         if: ${{ env.BUILD_RELEASE == 'true' }} | ||||
|         env: | ||||
|           TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||||
| @ -350,8 +345,7 @@ jobs: | ||||
|           APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||||
|           APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||||
|           TAURI_CONF_ARGS: "--config ${{ matrix.os == 'windows-latest' && 'src-tauri\\tauri.release.conf.json' || 'src-tauri/tauri.release.conf.json' }}" | ||||
|         with: | ||||
|           args: "${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|         run: "yarn tauri build ${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|  | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: matrix.os != 'ubuntu-latest' | ||||
| @ -385,6 +379,8 @@ jobs: | ||||
|           TS_NODE_COMPILER_OPTIONS: '{"module": "commonjs"}' | ||||
|  | ||||
|   publish-apps-release: | ||||
|     permissions: | ||||
|       contents: write | ||||
|     runs-on: ubuntu-latest | ||||
|     if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }} | ||||
|     needs: [check-format, check-types, check-typos, build-test-web, prepare-json-files, build-test-apps] | ||||
|  | ||||
							
								
								
									
										104
									
								
								.github/workflows/playwright.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -38,6 +38,8 @@ jobs: | ||||
|     runs-on: ubuntu-latest-8-cores | ||||
|     needs: check-rust-changes | ||||
|     steps: | ||||
|     - name: Tune GitHub-hosted runner network | ||||
|       uses: smorimoto/tune-github-hosted-runner-network@v1 | ||||
|     - uses: actions/checkout@v4 | ||||
|     - uses: actions/setup-node@v4 | ||||
|       with: | ||||
| @ -90,26 +92,24 @@ jobs: | ||||
|     - name: build web | ||||
|       run: yarn build:local | ||||
|     - name: Run ubuntu/chrome snapshots | ||||
|       run: yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts | ||||
|       continue-on-error: true | ||||
|       run: | | ||||
|         yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|         snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|     - name: Clean up test-results | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|       continue-on-error: true | ||||
|       run: rm -r test-results | ||||
|     - name: check for changes | ||||
|       id: git-check | ||||
|       run: | | ||||
|           git add . | ||||
|           if git status | grep -q "Changes to be committed" | ||||
|           then | ||||
|             echo "::set-output name=modified::true" | ||||
|           else | ||||
|             echo "::set-output name=modified::false" | ||||
|           then echo "modified=true" >> $GITHUB_OUTPUT | ||||
|           else echo "modified=false" >> $GITHUB_OUTPUT | ||||
|           fi | ||||
|     - name: Commit changes, if any | ||||
|       if: steps.git-check.outputs.modified == 'true' | ||||
| @ -125,23 +125,63 @@ jobs: | ||||
|         git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" || true | ||||
|         git push | ||||
|         git push origin ${{ github.head_ref }} | ||||
|     # only upload artifacts if there's actually changes | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: steps.git-check.outputs.modified == 'true' | ||||
|       with: | ||||
|         name: playwright-report-ubuntu-${{ github.sha }} | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|     # if have previous run results, use them | ||||
|     - uses: actions/download-artifact@v4 | ||||
|       if: always() | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         name: test-results-ubuntu-${{ github.sha }} | ||||
|         path: test-results/ | ||||
|     - name: Run ubuntu/chrome flow retry failures | ||||
|       id: retry | ||||
|       if: always() | ||||
|       run: | | ||||
|         if [[ -d "test-results" ]]; | ||||
|         then if [[ $(ls -1 "test-results" | wc -l) != "0" ]]; | ||||
|           then echo "retried=true" >> $GITHUB_OUTPUT; | ||||
|           else echo "retried=false" >> $GITHUB_OUTPUT; exit 0; | ||||
|           fi; | ||||
|         else echo "retried=false" >> $GITHUB_OUTPUT; exit 0; | ||||
|         fi; | ||||
|         yarn playwright test --project="Google Chrome" --last-failed e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - name: Run ubuntu/chrome flow | ||||
|       if: steps.retry.outputs.retried == 'false' | ||||
|       run: yarn playwright test --project="Google Chrome" e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report-ubuntu | ||||
|         name: test-results-ubuntu-${{ github.sha }} | ||||
|         path: test-results/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: always() | ||||
|       with: | ||||
|         name: playwright-report-ubuntu-${{ github.sha }} | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|   playwright-macos: | ||||
|     timeout-minutes: 60 | ||||
|     runs-on: macos-14 | ||||
|     runs-on: macos-14-large | ||||
|     needs: check-rust-changes | ||||
|     steps: | ||||
|     - name: Tune GitHub-hosted runner network | ||||
|       uses: smorimoto/tune-github-hosted-runner-network@v1 | ||||
|     - uses: actions/checkout@v4 | ||||
|     - uses: actions/setup-node@v4 | ||||
|       with: | ||||
| @ -194,16 +234,48 @@ jobs: | ||||
|       run: yarn build:wasm | ||||
|     - name: build web | ||||
|       run: yarn build:local | ||||
|     # if have previous run results, use them | ||||
|     - uses: actions/download-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         name: test-results-macos-${{ github.sha }} | ||||
|         path: test-results/ | ||||
|     - name: Run macos/safari flow retry failures | ||||
|       id: retry | ||||
|       if: always() | ||||
|       run: | | ||||
|         if [[ -d "test-results" ]]; | ||||
|         then if [[ $(ls -1 "test-results" | wc -l) != "0" ]]; | ||||
|           then echo "retried=true" >> $GITHUB_OUTPUT; | ||||
|           else echo "retried=false" >> $GITHUB_OUTPUT; exit 0; | ||||
|           fi; | ||||
|         else echo "retried=false" >> $GITHUB_OUTPUT; exit 0; | ||||
|         fi; | ||||
|         yarn playwright test --project="webkit" --last-failed e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - name: Run macos/safari flow | ||||
|       if: steps.retry.outputs.retried == 'false' | ||||
|       # webkit doesn't work on Ubuntu because of the same reason tauri doesn't (webRTC issues) | ||||
|       # TODO remove this and the matrix and run all tests on ubuntu when this is fixed | ||||
|       run: yarn playwright test --project="webkit" e2e/playwright/flow-tests.spec.ts | ||||
|       env: | ||||
|         CI: true | ||||
|         token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|       with: | ||||
|         name: playwright-report-macos | ||||
|         name: test-results-macos-${{ github.sha }} | ||||
|         path: test-results/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|     - uses: actions/upload-artifact@v4 | ||||
|       if: ${{ always() }} | ||||
|       with: | ||||
|         name: playwright-report-macos-${{ github.sha }} | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|  | ||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -56,3 +56,5 @@ src-tauri/gen | ||||
|  | ||||
| src/wasm-lib/grackle/stdlib_cube_partial.json | ||||
| Mac_App_Distribution.provisionprofile | ||||
|  | ||||
| *.tsbuildinfo | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| # Ignore artifacts: | ||||
| build | ||||
| dist | ||||
| coverage | ||||
|  | ||||
| # Ignore Rust projects: | ||||
| @ -9,5 +10,6 @@ src/wasm-lib/pkg | ||||
| src/wasm-lib/kcl/bindings | ||||
| e2e/playwright/export-snapshots | ||||
|  | ||||
|  | ||||
| # XState generated files | ||||
| src/machines/**.typegen.ts | ||||
|  | ||||
							
								
								
									
										7
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,7 +0,0 @@ | ||||
| { | ||||
|     "cSpell.words": [ | ||||
|         "geos" | ||||
|     ], | ||||
|     "editor.tabSize": 2, | ||||
|     "editor.insertSpaces": true, | ||||
| } | ||||
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						| @ -1,14 +1,17 @@ | ||||
| .PHONY: dev | ||||
|  | ||||
| WASM_LIB_FILES := $(wildcard src/wasm-lib/**/*.rs) | ||||
| TS_SRC := $(wildcard src/**/*.tsx) $(wildcard src/**/*.ts) | ||||
| XSTATE_TYPEGENS := $(wildcard src/machines/*.typegen.ts) | ||||
|  | ||||
| dev: node_modules public/wasm_lib_bg.wasm | ||||
| dev: node_modules public/wasm_lib_bg.wasm $(XSTATE_TYPEGENS) | ||||
| 	yarn start | ||||
|  | ||||
| $(XSTATE_TYPEGENS): $(TS_SRC) | ||||
| 	yarn xstate typegen 'src/**/*.ts?(x)' | ||||
|  | ||||
| public/wasm_lib_bg.wasm: $(WASM_LIB_FILES) | ||||
| 	yarn build:wasm-dev | ||||
|  | ||||
| node_modules: package.json | ||||
|  | ||||
| package.json: | ||||
| node_modules: package.json yarn.lock | ||||
| 	yarn install | ||||
|  | ||||
							
								
								
									
										54
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @ -89,25 +89,6 @@ enable third-party cookies. You can enable third-party cookies by clicking on | ||||
| the eye with a slash through it in the URL bar, and clicking on "Enable | ||||
| Third-Party Cookies". | ||||
|  | ||||
| ## Running tests | ||||
|  | ||||
| First, start the dev server following "Running a development build" above. | ||||
|  | ||||
| Then in another terminal tab, run: | ||||
|  | ||||
| ``` | ||||
| yarn test | ||||
| ``` | ||||
|  | ||||
| Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default. | ||||
|  | ||||
| For running the rust (not tauri rust though) only, you can | ||||
|  | ||||
| ```bash | ||||
| cd src/wasm-lib | ||||
| cargo test | ||||
| ``` | ||||
|  | ||||
| ## Tauri | ||||
|  | ||||
| To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have been done before hand then | ||||
| @ -195,7 +176,9 @@ $ cargo +nightly fuzz run parser | ||||
| For more information on fuzzing you can check out | ||||
| [this guide](https://rust-fuzz.github.io/book/cargo-fuzz.html). | ||||
|  | ||||
| ### Playwright | ||||
| ## Tests | ||||
|  | ||||
| ### Playwright tests | ||||
|  | ||||
| For a portable way to run Playwright you'll need Docker. | ||||
|  | ||||
| @ -284,6 +267,37 @@ Where `./store` should look like this | ||||
|  | ||||
| However because much of our tests involve clicking in the stream at specific locations, it's code-gen looks `await page.locator('video').click();` when really we need to use a pixel coord, so I think it's of limited use. | ||||
|  | ||||
| ### Unit and component tests | ||||
|  | ||||
| If you already haven't, run the following: | ||||
|  | ||||
| ``` | ||||
| yarn | ||||
| yarn build:wasm | ||||
| yarn start | ||||
| ``` | ||||
|  | ||||
| and finally: | ||||
|  | ||||
| ``` | ||||
| yarn test:nowatch | ||||
| ``` | ||||
|  | ||||
| For individual testing: | ||||
|  | ||||
| ``` | ||||
| yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false | ||||
| ``` | ||||
|  | ||||
| Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default. | ||||
|  | ||||
| ### Rust tests | ||||
|  | ||||
| ```bash | ||||
| cd src/wasm-lib | ||||
| cargo test | ||||
| ``` | ||||
|  | ||||
| #### Some notes on CI | ||||
|  | ||||
| The tests are broken into snapshot tests and non-snapshot tests, and they run in that order, they automatically commit new snap shots, so if you see an image commit check it was an intended change. If we have non-determinism in the snapshots such that they are always committing new images, hopefully this annoyance makes us fix them asap, if you notice this happening let Kurt know. But for the odd occasion `git reset --hard HEAD~ && git push -f` is your friend. | ||||
|  | ||||
| @ -23,5 +23,7 @@ once fixed in engine will just start working here with no language changes. | ||||
| - **Chamfers**: Chamfers cannot intersect, you will get an error. Only simple | ||||
|     chamfer cases work currently. | ||||
|  | ||||
|     Sketching on the chamfered face does not currently work. | ||||
|  | ||||
| - **Shell**: Shell is only working for `end` faces, not for `side` or `start`  | ||||
|     faces. We are tracking the engine side bug on this. | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle to match the given length for x. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) -> number | ||||
| angleToMatchLengthX(segment_name: TagIdentifier, to: number, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,11 +17,8 @@ angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) | ||||
| ```js | ||||
| const sketch001 = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([2, 5], %, 'seg01') | ||||
|   |> angledLineToX([ | ||||
|        -angleToMatchLengthX('seg01', 7, %), | ||||
|        10 | ||||
|      ], %) | ||||
|   |> line([2, 5], %, $seg01) | ||||
|   |> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %) | ||||
|   |> close(%) | ||||
|  | ||||
| const extrusion = extrude(5, sketch001) | ||||
| @ -31,7 +28,12 @@ const extrusion = extrude(5, sketch001) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `to`: `number` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| @ -71,10 +73,181 @@ const extrusion = extrude(5, sketch001) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -101,8 +274,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -110,8 +287,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -123,8 +304,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -132,8 +317,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -141,8 +330,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -152,8 +345,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -165,8 +362,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle to match the given length for y. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) -> number | ||||
| angleToMatchLengthY(segment_name: TagIdentifier, to: number, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,9 +17,9 @@ angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) | ||||
| ```js | ||||
| const sketch001 = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([1, 2], %, 'seg01') | ||||
|   |> line([1, 2], %, $seg01) | ||||
|   |> angledLine({ | ||||
|        angle: angleToMatchLengthY('seg01', 15, %), | ||||
|        angle: angleToMatchLengthY(seg01, 15, %), | ||||
|        length: 5 | ||||
|      }, %) | ||||
|   |> yLineTo(0, %) | ||||
| @ -32,7 +32,12 @@ const extrusion = extrude(5, sketch001) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `to`: `number` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| @ -72,10 +77,181 @@ const extrusion = extrude(5, sketch001) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -102,8 +278,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -111,8 +291,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -124,8 +308,12 @@ const extrusion = extrude(5, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -133,8 +321,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -142,8 +334,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -153,8 +349,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -166,8 +366,12 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLine(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLine(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -78,10 +78,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -108,8 +279,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -117,8 +292,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -130,8 +309,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -139,8 +322,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -148,8 +335,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -159,8 +350,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -172,15 +367,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -222,10 +428,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -252,8 +629,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -261,8 +642,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -274,8 +659,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -283,8 +672,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -292,8 +685,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -303,8 +700,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -316,8 +717,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line of a given x length. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,10 +17,10 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: Strin | ||||
| ```js | ||||
| const sketch001 = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLineOfXLength({ angle: 45, length: 10 }, %, "edge1") | ||||
|   |> angledLineOfXLength({ angle: -15, length: 20 }, %, "edge2") | ||||
|   |> angledLineOfXLength({ angle: 45, length: 10 }, %, $edge1) | ||||
|   |> angledLineOfXLength({ angle: -15, length: 20 }, %, $edge2) | ||||
|   |> line([0, -5], %) | ||||
|   |> close(%, "edge3") | ||||
|   |> close(%, $edge3) | ||||
|  | ||||
| const extrusion = extrude(10, sketch001) | ||||
| ``` | ||||
| @ -77,10 +77,181 @@ const extrusion = extrude(10, sketch001) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -107,8 +278,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -116,8 +291,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -129,8 +308,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -138,8 +321,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -147,8 +334,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -158,8 +349,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -171,15 +366,26 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -221,10 +427,181 @@ const extrusion = extrude(10, sketch001) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -251,8 +628,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -260,8 +641,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -273,8 +658,12 @@ const extrusion = extrude(10, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -282,8 +671,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -291,8 +684,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -302,8 +699,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -315,8 +716,12 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line of a given y length. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -79,10 +79,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -109,8 +280,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -118,8 +293,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -131,8 +310,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -140,8 +323,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -149,8 +336,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -160,8 +351,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -173,15 +368,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -223,10 +429,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -253,8 +630,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -262,8 +643,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -275,8 +660,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -284,8 +673,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -293,8 +686,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -304,8 +701,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -317,8 +718,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line that intersects with a given line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -18,7 +18,7 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc | ||||
| const exampleSketch = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> lineTo([5, 10], %) | ||||
|   |> lineTo([-10, 10], %, "lineToIntersect") | ||||
|   |> lineTo([-10, 10], %, $lineToIntersect) | ||||
|   |> lineTo([0, 20], %) | ||||
|   |> angledLineThatIntersects({ | ||||
|        angle: 80, | ||||
| @ -40,7 +40,9 @@ const example = extrude(10, exampleSketch) | ||||
| 	// The angle of the line. | ||||
| 	angle: number, | ||||
| 	// The tag of the line to intersect with. | ||||
| 	intersectTag: string, | ||||
| 	intersectTag: { | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The offset from the intersecting line. | ||||
| 	offset: number, | ||||
| } | ||||
| @ -83,10 +85,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -113,8 +286,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -122,8 +299,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -135,8 +316,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -144,8 +329,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -153,8 +342,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -164,8 +357,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -177,15 +374,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -227,10 +435,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -257,8 +636,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -266,8 +649,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -279,8 +666,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -288,8 +679,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -297,8 +692,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -308,8 +707,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -321,8 +724,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line to a given x coordinate. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -76,10 +76,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -106,8 +277,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -115,8 +290,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -128,8 +307,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -137,8 +320,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -146,8 +333,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -157,8 +348,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -170,15 +365,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -220,10 +426,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -250,8 +627,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -259,8 +640,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -272,8 +657,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -281,8 +670,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -290,8 +683,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -301,8 +698,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -314,8 +715,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line to a given y coordinate. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -76,10 +76,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -106,8 +277,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -115,8 +290,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -128,8 +307,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -137,8 +320,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -146,8 +333,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -157,8 +348,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -170,15 +365,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -220,10 +426,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -250,8 +627,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -259,8 +640,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -272,8 +657,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -281,8 +670,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -290,8 +683,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -301,8 +698,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -314,8 +715,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
							
								
								
									
										473
									
								
								docs/kcl/arc.md
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| arc(data: ArcData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| arc(data: ArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -87,10 +87,181 @@ const exampleSketch = startSketchOn('XZ') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -117,8 +288,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -126,8 +301,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -139,8 +318,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -148,8 +331,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -157,8 +344,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -168,8 +359,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -181,15 +376,26 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -231,10 +437,181 @@ const exampleSketch = startSketchOn('XZ') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -261,8 +638,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -270,8 +651,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -283,8 +668,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -292,8 +681,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -301,8 +694,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -312,8 +709,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -325,8 +726,12 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a bezier curve. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -82,10 +82,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -112,8 +283,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -121,8 +296,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -134,8 +313,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -143,8 +326,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -152,8 +339,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -163,8 +354,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -176,15 +371,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -226,10 +432,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -256,8 +633,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -265,8 +646,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -278,8 +663,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -287,8 +676,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -296,8 +689,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -307,8 +704,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -320,8 +721,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Create chamfers on tagged paths. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| chamfer(data: ChamferData, extrude_group: ExtrudeGroup) -> ExtrudeGroup | ||||
| chamfer(data: ChamferData, extrude_group: ExtrudeGroup, tag?: TagDeclarator) -> ExtrudeGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -22,19 +22,19 @@ const chamferLength = 2 | ||||
|  | ||||
| const mountingPlateSketch = startSketchOn("XY") | ||||
|   |> startProfileAt([-width / 2, -length / 2], %) | ||||
|   |> lineTo([width / 2, -length / 2], %, 'edge1') | ||||
|   |> lineTo([width / 2, length / 2], %, 'edge2') | ||||
|   |> lineTo([-width / 2, length / 2], %, 'edge3') | ||||
|   |> close(%, 'edge4') | ||||
|   |> lineTo([width / 2, -length / 2], %, $edge1) | ||||
|   |> lineTo([width / 2, length / 2], %, $edge2) | ||||
|   |> lineTo([-width / 2, length / 2], %, $edge3) | ||||
|   |> close(%, $edge4) | ||||
|  | ||||
| const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
|   |> chamfer({ | ||||
|        length: chamferLength, | ||||
|        tags: [ | ||||
|          getNextAdjacentEdge('edge1', %), | ||||
|          getNextAdjacentEdge('edge2', %), | ||||
|          getNextAdjacentEdge('edge3', %), | ||||
|          getNextAdjacentEdge('edge4', %) | ||||
|          getNextAdjacentEdge(edge1, %), | ||||
|          getNextAdjacentEdge(edge2, %), | ||||
|          getNextAdjacentEdge(edge3, %), | ||||
|          getNextAdjacentEdge(edge4, %) | ||||
|        ] | ||||
|      }, %) | ||||
| ``` | ||||
| @ -50,7 +50,9 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	length: number, | ||||
| 	// The tags of the paths you want to chamfer. | ||||
| 	tags: [uuid | | ||||
| string], | ||||
| { | ||||
| 	value: string, | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| @ -58,6 +60,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -99,10 +123,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -129,8 +217,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -138,8 +230,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -151,8 +247,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -160,8 +260,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -169,8 +273,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -180,8 +288,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -193,8 +305,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -208,10 +324,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -219,14 +339,26 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -235,6 +367,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -276,10 +430,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -306,8 +524,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -315,8 +537,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -328,8 +554,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -337,8 +567,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -346,8 +580,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -357,8 +595,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -370,8 +612,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -385,10 +631,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -396,10 +646,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Sketch a circle. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| circle(center: [number], radius: number, tag?: String, sketch_surface_or_group: SketchSurfaceOrGroup) -> SketchGroup | ||||
| circle(center: [number], radius: number, sketch_surface_or_group: SketchSurfaceOrGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -41,7 +41,6 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| * `center`: `[number]` (REQUIRED) | ||||
| * `radius`: `number` (REQUIRED) | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `sketch_surface_or_group`: `SketchSurfaceOrGroup` - A sketch surface or a sketch group. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| @ -76,10 +75,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -138,10 +308,74 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -168,8 +402,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -177,8 +415,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -190,8 +432,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -199,8 +445,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -208,8 +458,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -219,8 +473,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -232,14 +490,26 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -281,10 +551,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -311,8 +752,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -320,8 +765,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -333,8 +782,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -342,8 +795,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -351,8 +808,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -362,8 +823,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -375,8 +840,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Close the current sketch. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| close(sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| close(sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -77,10 +77,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -107,8 +278,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -116,8 +291,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -129,8 +308,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -138,8 +321,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -147,8 +334,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -158,8 +349,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -171,15 +366,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -221,10 +427,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -251,8 +628,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -260,8 +641,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -273,8 +658,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -282,8 +671,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -291,8 +684,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -302,8 +699,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -315,8 +716,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -102,10 +102,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -132,8 +303,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -142,8 +317,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -155,8 +334,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -164,8 +347,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -173,8 +360,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -184,8 +375,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -197,8 +392,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -216,6 +415,28 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -257,10 +478,74 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -287,8 +572,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -296,8 +585,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -309,8 +602,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -318,8 +615,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -327,8 +628,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -338,8 +643,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -351,8 +660,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -367,10 +680,14 @@ const example = extrude(10, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -378,10 +695,14 @@ const example = extrude(10, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | | ||||
|  | ||||
| @ -22,19 +22,19 @@ const filletRadius = 2 | ||||
|  | ||||
| const mountingPlateSketch = startSketchOn("XY") | ||||
|   |> startProfileAt([-width / 2, -length / 2], %) | ||||
|   |> lineTo([width / 2, -length / 2], %, 'edge1') | ||||
|   |> lineTo([width / 2, length / 2], %, 'edge2') | ||||
|   |> lineTo([-width / 2, length / 2], %, 'edge3') | ||||
|   |> close(%, 'edge4') | ||||
|   |> lineTo([width / 2, -length / 2], %, $edge1) | ||||
|   |> lineTo([width / 2, length / 2], %, $edge2) | ||||
|   |> lineTo([-width / 2, length / 2], %, $edge3) | ||||
|   |> close(%, $edge4) | ||||
|  | ||||
| const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
|   |> fillet({ | ||||
|        radius: filletRadius, | ||||
|        tags: [ | ||||
|          getNextAdjacentEdge('edge1', %), | ||||
|          getNextAdjacentEdge('edge2', %), | ||||
|          getNextAdjacentEdge('edge3', %), | ||||
|          getNextAdjacentEdge('edge4', %) | ||||
|          getNextAdjacentEdge(edge1, %), | ||||
|          getNextAdjacentEdge(edge2, %), | ||||
|          getNextAdjacentEdge(edge3, %), | ||||
|          getNextAdjacentEdge(edge4, %) | ||||
|        ] | ||||
|      }, %) | ||||
| ``` | ||||
| @ -50,7 +50,9 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	radius: number, | ||||
| 	// The tags of the paths you want to fillet. | ||||
| 	tags: [uuid | | ||||
| string], | ||||
| { | ||||
| 	value: string, | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| @ -58,6 +60,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -99,10 +123,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -129,8 +217,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -138,8 +230,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -151,8 +247,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -160,8 +260,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -169,8 +273,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -180,8 +288,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -193,8 +305,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -208,10 +324,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -219,10 +339,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
| @ -235,6 +359,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -276,10 +422,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -306,8 +516,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -315,8 +529,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -328,8 +546,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -337,8 +559,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -346,8 +572,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -357,8 +587,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -370,8 +604,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -385,10 +623,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -396,10 +638,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get an edge on a 3D solid. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,7 +17,7 @@ getEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ```js | ||||
| const box = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([0, 10], %, 'revolveAxis') | ||||
|   |> line([0, 10], %, $revolveAxis) | ||||
|   |> line([10, 0], %) | ||||
|   |> line([0, -10], %) | ||||
|   |> close(%) | ||||
| @ -30,7 +30,7 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
|   |> line([0, -10], %) | ||||
|   |> close(%) | ||||
|   |> revolve({ | ||||
|        axis: getEdge('revolveAxis', box), | ||||
|        axis: getEdge(revolveAxis, box), | ||||
|        angle: 90 | ||||
|      }, %) | ||||
| ``` | ||||
| @ -39,12 +39,39 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -86,10 +113,74 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -116,8 +207,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -125,8 +220,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -138,8 +237,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -147,8 +250,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -156,8 +263,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -167,8 +278,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -180,8 +295,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -195,10 +314,14 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -206,10 +329,14 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the next adjacent edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getNextAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getNextAdjacentEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -21,15 +21,13 @@ const exampleSketch = startSketchOn('XZ') | ||||
|   |> angledLine({ angle: 60, length: 10 }, %) | ||||
|   |> angledLine({ angle: 120, length: 10 }, %) | ||||
|   |> line([-10, 0], %) | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge') | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge) | ||||
|   |> close(%) | ||||
|  | ||||
| const example = extrude(5, exampleSketch) | ||||
|   |> fillet({ | ||||
|        radius: 3, | ||||
|        tags: [ | ||||
|          getNextAdjacentEdge("referenceEdge", %) | ||||
|        ] | ||||
|        tags: [getNextAdjacentEdge(referenceEdge, %)] | ||||
|      }, %) | ||||
| ``` | ||||
|  | ||||
| @ -37,12 +35,39 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -84,10 +109,74 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -114,8 +203,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -123,8 +216,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -136,8 +233,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -145,8 +246,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -154,8 +259,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -165,8 +274,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -178,8 +291,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -193,10 +310,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -204,10 +325,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the opposite edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getOppositeEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getOppositeEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -21,13 +21,13 @@ const exampleSketch = startSketchOn('XZ') | ||||
|   |> angledLine({ angle: 60, length: 10 }, %) | ||||
|   |> angledLine({ angle: 120, length: 10 }, %) | ||||
|   |> line([-10, 0], %) | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge') | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge) | ||||
|   |> close(%) | ||||
|  | ||||
| const example = extrude(5, exampleSketch) | ||||
|   |> fillet({ | ||||
|        radius: 3, | ||||
|        tags: [getOppositeEdge("referenceEdge", %)] | ||||
|        tags: [getOppositeEdge(referenceEdge, %)] | ||||
|      }, %) | ||||
| ``` | ||||
|  | ||||
| @ -35,12 +35,39 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -82,10 +109,74 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -112,8 +203,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -121,8 +216,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -134,8 +233,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -143,8 +246,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -152,8 +259,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -163,8 +274,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -176,8 +291,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -191,10 +310,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -202,10 +325,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the previous adjacent edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getPreviousAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getPreviousAdjacentEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -21,14 +21,14 @@ const exampleSketch = startSketchOn('XZ') | ||||
|   |> angledLine({ angle: 60, length: 10 }, %) | ||||
|   |> angledLine({ angle: 120, length: 10 }, %) | ||||
|   |> line([-10, 0], %) | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge') | ||||
|   |> angledLine({ angle: 240, length: 10 }, %, $referenceEdge) | ||||
|   |> close(%) | ||||
|  | ||||
| const example = extrude(5, exampleSketch) | ||||
|   |> fillet({ | ||||
|        radius: 3, | ||||
|        tags: [ | ||||
|          getPreviousAdjacentEdge("referenceEdge", %) | ||||
|          getPreviousAdjacentEdge(referenceEdge, %) | ||||
|        ] | ||||
|      }, %) | ||||
| ``` | ||||
| @ -37,12 +37,39 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -84,10 +111,74 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -114,8 +205,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -123,8 +218,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -136,8 +235,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -145,8 +248,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -154,8 +261,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -165,8 +276,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -178,8 +293,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -193,10 +312,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -204,10 +327,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -48,6 +48,28 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -89,10 +111,74 @@ const part001 = startSketchOn('XY') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -119,8 +205,12 @@ const part001 = startSketchOn('XY') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -128,8 +218,12 @@ const part001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -141,8 +235,12 @@ const part001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -150,8 +248,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -159,8 +261,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -170,8 +276,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -183,8 +293,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -198,10 +312,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -209,10 +327,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
| @ -225,6 +347,28 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -266,10 +410,74 @@ const part001 = startSketchOn('XY') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -296,8 +504,12 @@ const part001 = startSketchOn('XY') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -305,8 +517,12 @@ const part001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -318,8 +534,12 @@ const part001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -327,8 +547,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -336,8 +560,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -347,8 +575,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -360,8 +592,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -375,10 +611,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -386,10 +626,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
							
								
								
									
										693
									
								
								docs/kcl/hole.md
									
									
									
									
									
								
							
							
						
						| @ -88,10 +88,181 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -118,8 +289,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -128,8 +303,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -141,8 +320,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -150,8 +333,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -159,8 +346,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -170,8 +361,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -183,8 +378,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -232,10 +431,181 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -262,8 +632,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -271,8 +645,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -284,8 +662,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -293,8 +675,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -302,8 +688,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -313,8 +703,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -326,8 +720,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -375,10 +773,181 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -405,8 +974,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -414,8 +987,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -427,8 +1004,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -436,8 +1017,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -445,8 +1030,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -456,8 +1045,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -469,8 +1062,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -55,6 +55,7 @@ layout: manual | ||||
| * [`patternCircular3d`](kcl/patternCircular3d) | ||||
| * [`patternLinear2d`](kcl/patternLinear2d) | ||||
| * [`patternLinear3d`](kcl/patternLinear3d) | ||||
| * [`patternTransform`](kcl/patternTransform) | ||||
| * [`pi`](kcl/pi) | ||||
| * [`pow`](kcl/pow) | ||||
| * [`profileStart`](kcl/profileStart) | ||||
|  | ||||
| @ -68,10 +68,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -98,8 +269,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -107,8 +282,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -120,8 +299,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -129,8 +312,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -138,8 +325,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -149,8 +340,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -162,8 +357,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -68,10 +68,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -98,8 +269,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -107,8 +282,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -120,8 +299,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -129,8 +312,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -138,8 +325,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -149,8 +340,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -162,8 +357,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
							
								
								
									
										473
									
								
								docs/kcl/line.md
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw a line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| line(delta: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| line(delta: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -81,10 +81,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -111,8 +282,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -120,8 +295,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -133,8 +312,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -142,8 +325,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -151,8 +338,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -162,8 +353,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -175,15 +370,26 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -225,10 +431,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -255,8 +632,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -264,8 +645,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -277,8 +662,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -286,8 +675,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -295,8 +688,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -306,8 +703,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -319,8 +720,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| lineTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| lineTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -68,10 +68,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -98,8 +269,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -107,8 +282,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -120,8 +299,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -129,8 +312,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -138,8 +325,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -149,8 +340,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -162,15 +357,26 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -212,10 +418,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -242,8 +619,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -251,8 +632,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -264,8 +649,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -273,8 +662,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -282,8 +675,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -293,8 +690,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -306,8 +707,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -86,10 +86,181 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -116,8 +287,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -126,8 +301,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -139,8 +318,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -148,8 +331,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -157,8 +344,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -168,8 +359,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -181,8 +376,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -52,6 +52,28 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -93,10 +115,74 @@ const example = extrude(-5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -123,8 +209,12 @@ const example = extrude(-5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -132,8 +222,12 @@ const example = extrude(-5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -145,8 +239,12 @@ const example = extrude(-5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -154,8 +252,12 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -163,8 +265,12 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -174,8 +280,12 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -187,8 +297,12 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -203,10 +317,14 @@ const example = extrude(-5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -214,10 +332,14 @@ const example = extrude(-5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | | ||||
|  | ||||
| @ -79,10 +79,181 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -109,8 +280,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -119,8 +294,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -132,8 +311,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -141,8 +324,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -150,8 +337,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -161,8 +352,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -174,8 +369,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -50,6 +50,28 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -91,10 +113,74 @@ const example = extrude(1, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -121,8 +207,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -130,8 +220,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -143,8 +237,12 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -152,8 +250,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -161,8 +263,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -172,8 +278,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -185,8 +295,12 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -201,10 +315,14 @@ const example = extrude(1, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -212,10 +330,14 @@ const example = extrude(1, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | | ||||
|  | ||||
							
								
								
									
										356
									
								
								docs/kcl/patternTransform.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -17,9 +17,9 @@ profileStart(sketch_group: SketchGroup) -> [number] | ||||
| ```js | ||||
| const sketch001 = startSketchOn('XY') | ||||
|   |> startProfileAt([5, 2], %) | ||||
|   |> angledLine({ angle: 120, length: 50 }, %, 'seg01') | ||||
|   |> angledLine({ angle: 120, length: 50 }, %, $seg01) | ||||
|   |> angledLine({ | ||||
|        angle: segAng('seg01', %) + 120, | ||||
|        angle: segAng(seg01, %) + 120, | ||||
|        length: 50 | ||||
|      }, %) | ||||
|   |> lineTo(profileStart(%), %) | ||||
| @ -69,10 +69,181 @@ const sketch001 = startSketchOn('XY') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -99,8 +270,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -108,8 +283,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -121,8 +300,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -130,8 +313,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -139,8 +326,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -150,8 +341,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -163,8 +358,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -64,10 +64,181 @@ const sketch001 = startSketchOn('XY') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -94,8 +265,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -103,8 +278,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -116,8 +295,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -125,8 +308,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -134,8 +321,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -145,8 +336,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -158,8 +353,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -63,10 +63,181 @@ const sketch001 = startSketchOn('XY') | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -93,8 +264,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -102,8 +277,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -115,8 +294,12 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -124,8 +307,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -133,8 +320,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -144,8 +335,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -157,8 +352,12 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -99,7 +99,7 @@ const box = startSketchOn('XY') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([0, 20], %) | ||||
|   |> line([20, 0], %) | ||||
|   |> line([0, -20], %, 'revolveAxis') | ||||
|   |> line([0, -20], %, $revolveAxis) | ||||
|   |> close(%) | ||||
|   |> extrude(20, %) | ||||
| 
 | ||||
| @ -107,7 +107,7 @@ const sketch001 = startSketchOn(box, "END") | ||||
|   |> circle([10, 10], 4, %) | ||||
|   |> revolve({ | ||||
|        angle: 90, | ||||
|        axis: getOppositeEdge('revolveAxis', box) | ||||
|        axis: getOppositeEdge(revolveAxis, box) | ||||
|      }, %) | ||||
| ``` | ||||
| 
 | ||||
| @ -156,7 +156,9 @@ const part001 = revolve({ | ||||
| }, | ||||
| } | | ||||
| uuid | | ||||
| string, | ||||
| { | ||||
| 	value: string, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| @ -197,10 +199,181 @@ string, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -227,8 +400,12 @@ string, | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -236,8 +413,12 @@ string, | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -249,8 +430,12 @@ string, | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -258,8 +443,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -267,8 +456,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -278,8 +471,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -291,8 +488,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -307,6 +508,28 @@ string, | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -348,10 +571,74 @@ string, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -378,8 +665,12 @@ string, | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -387,8 +678,12 @@ string, | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -400,8 +695,12 @@ string, | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -409,8 +708,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -418,8 +721,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -429,8 +736,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -442,8 +753,12 @@ string, | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -457,10 +772,14 @@ string, | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -468,10 +787,14 @@ string, | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle of the segment. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segAng(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| segAng(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -18,11 +18,11 @@ segAng(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| const exampleSketch = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([10, 0], %) | ||||
|   |> line([5, 10], %, 'seg01') | ||||
|   |> line([5, 10], %, $seg01) | ||||
|   |> line([-10, 0], %) | ||||
|   |> angledLine([segAng('seg01', %), 10], %) | ||||
|   |> angledLine([segAng(seg01, %), 10], %) | ||||
|   |> line([-10, 0], %) | ||||
|   |> angledLine([segAng('seg01', %), -15], %) | ||||
|   |> angledLine([segAng(seg01, %), -15], %) | ||||
|   |> close(%) | ||||
|  | ||||
| const example = extrude(4, exampleSketch) | ||||
| @ -32,7 +32,12 @@ const example = extrude(4, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| @ -71,10 +76,181 @@ const example = extrude(4, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -101,8 +277,12 @@ const example = extrude(4, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -110,8 +290,12 @@ const example = extrude(4, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -123,8 +307,12 @@ const example = extrude(4, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -132,8 +320,12 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -141,8 +333,12 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -152,8 +348,12 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -165,8 +365,12 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the segment end of x. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segEndX(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| segEndX(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,9 +17,9 @@ segEndX(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ```js | ||||
| const exampleSketch = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([20, 0], %, "thing") | ||||
|   |> line([20, 0], %, $thing) | ||||
|   |> line([0, 5], %) | ||||
|   |> line([segEndX("thing", %), 0], %) | ||||
|   |> line([segEndX(thing, %), 0], %) | ||||
|   |> line([-20, 10], %) | ||||
|   |> close(%) | ||||
|  | ||||
| @ -30,7 +30,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| @ -69,10 +74,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -99,8 +275,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -108,8 +288,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -121,8 +305,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -130,8 +318,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -139,8 +331,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -150,8 +346,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -163,8 +363,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the segment end of y. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segEndY(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| segEndY(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -18,9 +18,9 @@ segEndY(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| const exampleSketch = startSketchOn('XZ') | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([20, 0], %) | ||||
|   |> line([0, 3], %, "thing") | ||||
|   |> line([0, 3], %, $thing) | ||||
|   |> line([-10, 0], %) | ||||
|   |> line([0, segEndY("thing", %)], %) | ||||
|   |> line([0, segEndY(thing, %)], %) | ||||
|   |> line([-10, 0], %) | ||||
|   |> close(%) | ||||
|  | ||||
| @ -31,7 +31,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| @ -70,10 +75,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -100,8 +276,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -109,8 +289,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -122,8 +306,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -131,8 +319,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -140,8 +332,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -151,8 +347,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -164,8 +364,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the length of the segment. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segLen(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| segLen(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,12 +17,9 @@ segLen(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ```js | ||||
| const exampleSketch = startSketchOn("XZ") | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine({ angle: 60, length: 10 }, %, "thing") | ||||
|   |> angledLine({ angle: 60, length: 10 }, %, $thing) | ||||
|   |> tangentialArc({ offset: -120, radius: 5 }, %) | ||||
|   |> angledLine({ | ||||
|        angle: -60, | ||||
|        length: segLen("thing", %) | ||||
|      }, %) | ||||
|   |> angledLine({ angle: -60, length: segLen(thing, %) }, %) | ||||
|   |> close(%) | ||||
|  | ||||
| const example = extrude(5, exampleSketch) | ||||
| @ -32,7 +29,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| @ -71,10 +73,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -101,8 +274,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -110,8 +287,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -123,8 +304,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -132,8 +317,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -141,8 +330,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -152,8 +345,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -165,8 +362,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -36,7 +36,9 @@ shell({ faces: ['end'], thickness: 0.25 }, firstSketch) | ||||
| { | ||||
| 	// The faces you want removed. | ||||
| 	faces: ["start" | "end" | | ||||
| string], | ||||
| { | ||||
| 	value: string, | ||||
| }], | ||||
| 	// The thickness of the shell. | ||||
| 	thickness: number, | ||||
| } | ||||
| @ -46,6 +48,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -87,10 +111,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -117,8 +205,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -126,8 +218,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -139,8 +235,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -148,8 +248,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -157,8 +261,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -168,8 +276,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -181,8 +293,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -196,10 +312,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -207,10 +327,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
| @ -223,6 +347,28 @@ string], | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -264,10 +410,74 @@ string], | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: SketchGroup, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -294,8 +504,12 @@ string], | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -303,8 +517,12 @@ string], | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -316,8 +534,12 @@ string], | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -325,8 +547,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -334,8 +560,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -345,8 +575,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -358,8 +592,12 @@ string], | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -373,10 +611,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -384,10 +626,14 @@ string], | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ Start a profile at a given point. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| startProfileAt(to: [number], sketch_surface: SketchSurface, tag?: String) -> SketchGroup | ||||
| startProfileAt(to: [number], sketch_surface: SketchSurface, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -90,10 +90,238 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: { | ||||
| 	// The id of the plane. | ||||
| 	id: uuid, | ||||
| 	// Origin of the plane. | ||||
| 	origin: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	type: "plane", | ||||
| 	// Type for a plane. | ||||
| 	value: "XY" | "XZ" | "YZ" | "Custom", | ||||
| 	// What should the plane’s X axis be? | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// What should the plane’s Y axis be? | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis (normal). | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: ExtrudeGroup, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| 	// What should the face’s X axis be? | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// What should the face’s Y axis be? | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis (normal). | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -117,7 +345,14 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -159,10 +394,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -189,8 +595,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -198,8 +608,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -211,8 +625,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -220,8 +638,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -229,8 +651,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -240,8 +666,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -253,8 +683,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -94,10 +94,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -124,8 +295,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -133,8 +308,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -146,8 +325,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -155,8 +338,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -164,8 +351,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -175,8 +366,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -188,8 +383,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Start a sketch on a specific plane or face. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| startSketchOn(data: SketchData, tag?: SketchOnFaceTag) -> SketchSurface | ||||
| startSketchOn(data: SketchData, tag?: FaceTag) -> SketchSurface | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -49,7 +49,7 @@ const example003 = extrude(5, exampleSketch003) | ||||
| const exampleSketch = startSketchOn("XY") | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line([10, 0], %) | ||||
|   |> line([0, 10], %, 'sketchingFace') | ||||
|   |> line([0, 10], %, $sketchingFace) | ||||
|   |> line([-10, 0], %) | ||||
|   |> close(%) | ||||
|  | ||||
| @ -60,7 +60,7 @@ const exampleSketch002 = startSketchOn(example, 'sketchingFace') | ||||
|   |> line([8, 0], %) | ||||
|   |> line([0, 8], %) | ||||
|   |> line([-8, 0], %) | ||||
|   |> close(%, 'sketchingFace002') | ||||
|   |> close(%, $sketchingFace002) | ||||
|  | ||||
| const example002 = extrude(10, exampleSketch002) | ||||
|  | ||||
| @ -163,6 +163,28 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| @ -204,10 +226,10 @@ const a1 = startSketchOn({ | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: ExtrudeGroup, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -234,8 +256,12 @@ const a1 = startSketchOn({ | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -243,8 +269,12 @@ const a1 = startSketchOn({ | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -256,8 +286,12 @@ const a1 = startSketchOn({ | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -265,8 +299,12 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -274,8 +312,12 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -285,8 +327,12 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -298,8 +344,12 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| @ -313,10 +363,14 @@ const a1 = startSketchOn({ | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -324,18 +378,24 @@ const a1 = startSketchOn({ | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `SketchOnFaceTag` - A tag for sketch on face. (OPTIONAL) | ||||
| * `tag`: `FaceTag` - A tag for a face. (OPTIONAL) | ||||
| ```js | ||||
| "start" | "end" | | ||||
| string | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
| @ -374,10 +434,238 @@ string | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: { | ||||
| 	// The id of the plane. | ||||
| 	id: uuid, | ||||
| 	// Origin of the plane. | ||||
| 	origin: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	type: "plane", | ||||
| 	// Type for a plane. | ||||
| 	value: "XY" | "XZ" | "YZ" | "Custom", | ||||
| 	// What should the plane’s X axis be? | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// What should the plane’s Y axis be? | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis (normal). | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: ExtrudeGroup, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| 	// What should the face’s X axis be? | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// What should the face’s Y axis be? | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis (normal). | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
|  | ||||
							
								
								
									
										91191
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -77,10 +77,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -107,8 +278,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -116,8 +291,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -129,8 +308,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -138,8 +321,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -147,8 +334,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -158,8 +349,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -171,15 +366,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -221,10 +427,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -251,8 +628,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -260,8 +641,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -273,8 +658,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -282,8 +671,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -291,8 +684,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -302,8 +699,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -315,8 +716,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -68,10 +68,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -98,8 +269,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -107,8 +282,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -120,8 +299,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -129,8 +312,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -138,8 +325,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -149,8 +340,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -162,15 +357,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -212,10 +418,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -242,8 +619,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -251,8 +632,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -264,8 +649,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -273,8 +662,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -282,8 +675,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -293,8 +690,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -306,8 +707,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line on the x-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| xLine(length: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| xLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -71,10 +71,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -101,8 +272,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -110,8 +285,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -123,8 +302,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -132,8 +315,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -141,8 +328,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -152,8 +343,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -165,15 +360,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -215,10 +421,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -245,8 +622,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -254,8 +635,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -267,8 +652,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -276,8 +665,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -285,8 +678,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -296,8 +693,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -309,8 +710,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point on the x-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| xLineTo(to: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| xLineTo(to: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -71,10 +71,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -101,8 +272,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -110,8 +285,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -123,8 +302,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -132,8 +315,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -141,8 +328,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -152,8 +343,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -165,15 +360,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -215,10 +421,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -245,8 +622,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -254,8 +635,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -267,8 +652,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -276,8 +665,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -285,8 +678,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -296,8 +693,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -309,8 +710,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line on the y-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| yLine(length: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| yLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -69,10 +69,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -99,8 +270,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -108,8 +283,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -121,8 +300,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -130,8 +313,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -139,8 +326,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -150,8 +341,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -163,15 +358,26 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -213,10 +419,181 @@ const example = extrude(10, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -243,8 +620,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -252,8 +633,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -265,8 +650,12 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -274,8 +663,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -283,8 +676,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -294,8 +691,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -307,8 +708,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point on the y-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| yLineTo(to: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| yLineTo(to: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -67,10 +67,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -97,8 +268,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -106,8 +281,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -119,8 +298,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -128,8 +311,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -137,8 +324,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -148,8 +339,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -161,15 +356,26 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -211,10 +417,181 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The extrude group the face is on. | ||||
| 	extrudeGroup: { | ||||
| 	// The id of the extrusion end cap | ||||
| 	endCapId: uuid, | ||||
| 	// Chamfers or fillets on this extrude group. | ||||
| 	filletOrChamfers: [{ | ||||
| 	// The engine id of the edge to fillet. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this fillet. | ||||
| 	id: uuid, | ||||
| 	radius: number, | ||||
| 	type: "fillet", | ||||
| } | | ||||
| { | ||||
| 	// The engine id of the edge to chamfer. | ||||
| 	edge_id: uuid, | ||||
| 	// The id of the engine command that called this chamfer. | ||||
| 	id: uuid, | ||||
| 	length: number, | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "chamfer", | ||||
| }], | ||||
| 	// The height of the extrude group. | ||||
| 	height: number, | ||||
| 	// The id of the extrude group. | ||||
| 	id: uuid, | ||||
| 	// The sketch group. | ||||
| 	sketchGroup: { | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| 	on: SketchSurface, | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	// The paths in the sketch group. | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| } | | ||||
| { | ||||
| 	// arc's direction | ||||
| 	ccw: string, | ||||
| 	// the arc's center | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| 	// The x coordinate. | ||||
| 	x: number, | ||||
| 	// The y coordinate. | ||||
| 	y: number, | ||||
| } | | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the face. | ||||
| 	id: uuid, | ||||
| 	// The original sketch group id of the object we are sketching on. | ||||
| 	sketchGroupId: uuid, | ||||
| 	type: "face", | ||||
| 	// The tag of the face. | ||||
| 	value: string, | ||||
| @ -241,8 +618,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -250,8 +631,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -263,8 +648,12 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -272,8 +661,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -281,8 +674,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -292,8 +689,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -305,8 +706,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
|  | ||||
| @ -91,8 +91,9 @@ const part001 = startSketchOn('-XZ') | ||||
|     ) | ||||
|   }) | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
|   await u.expectCmdLog('[data-message-type="execution-done"]') | ||||
|   await u.waitForCmdReceive('extrude') | ||||
| @ -330,7 +331,7 @@ const extrudeDefaultPlane = async (context: any, page: any, plane: string) => { | ||||
|  | ||||
|   const u = await getUtils(page) | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   // wait for execution done | ||||
| @ -386,8 +387,8 @@ test('Draft segments should look right', async ({ page, context }) => { | ||||
|   const u = await getUtils(page) | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   const PUR = 400 / 37.5 //pixeltoUnitRatio | ||||
|   await page.goto('/') | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
|  | ||||
|   await expect( | ||||
| @ -443,7 +444,7 @@ test('Draft rectangles should look right', async ({ page, context }) => { | ||||
|   const u = await getUtils(page) | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   const PUR = 400 / 37.5 //pixeltoUnitRatio | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|   await u.openDebugPanel() | ||||
|  | ||||
| @ -490,7 +491,7 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     const u = await getUtils(page) | ||||
|     await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|     const PUR = 400 / 37.5 //pixeltoUnitRatio | ||||
|     await page.goto('/') | ||||
|  | ||||
|     await u.waitForAuthSkipAppStart() | ||||
|     await u.openDebugPanel() | ||||
|  | ||||
| @ -589,7 +590,7 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     const u = await getUtils(page) | ||||
|     await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|     const PUR = 400 / 37.5 //pixeltoUnitRatio | ||||
|     await page.goto('/') | ||||
|  | ||||
|     await u.waitForAuthSkipAppStart() | ||||
|     await u.openDebugPanel() | ||||
|  | ||||
| @ -689,7 +690,7 @@ const part002 = startSketchOn(part001, 'seg01') | ||||
|   }, KCL_DEFAULT_LENGTH) | ||||
|  | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
| @ -739,7 +740,7 @@ test('Zoom to fit on load - solid 2d', async ({ page, context }) => { | ||||
|   }, KCL_DEFAULT_LENGTH) | ||||
|  | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
| @ -776,7 +777,7 @@ test('Zoom to fit on load - solid 3d', async ({ page, context }) => { | ||||
|   }, KCL_DEFAULT_LENGTH) | ||||
|  | ||||
|   await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|   await page.goto('/') | ||||
|  | ||||
|   await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
| @ -795,3 +796,83 @@ test('Zoom to fit on load - solid 3d', async ({ page, context }) => { | ||||
|     maxDiffPixels: 100, | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| test.describe('Grid visibility', () => { | ||||
|   test('Grid turned off', async ({ page }) => { | ||||
|     const u = await getUtils(page) | ||||
|     const stream = page.getByTestId('stream') | ||||
|     const mask = [ | ||||
|       page.locator('#app-header'), | ||||
|       page.locator('#sidebar-top-ribbon'), | ||||
|       page.locator('#sidebar-bottom-ribbon'), | ||||
|     ] | ||||
|  | ||||
|     await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|     await page.goto('/') | ||||
|     await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|     await u.openDebugPanel() | ||||
|     // wait for execution done | ||||
|     await expect( | ||||
|       page.locator('[data-message-type="execution-done"]') | ||||
|     ).toHaveCount(2) | ||||
|     await u.closeDebugPanel() | ||||
|     await u.closeKclCodePanel() | ||||
|     // TODO: Find a way to truly know that the objects have finished | ||||
|     // rendering, because an execution-done message is not sufficient. | ||||
|     await page.waitForTimeout(1000) | ||||
|  | ||||
|     await expect(stream).toHaveScreenshot({ | ||||
|       maxDiffPixels: 100, | ||||
|       mask, | ||||
|     }) | ||||
|   }) | ||||
|  | ||||
|   test('Grid turned on', async ({ page }) => { | ||||
|     await page.addInitScript( | ||||
|       async ({ settingsKey, settings }) => { | ||||
|         localStorage.setItem(settingsKey, settings) | ||||
|       }, | ||||
|       { | ||||
|         settingsKey: TEST_SETTINGS_KEY, | ||||
|         settings: TOML.stringify({ | ||||
|           settings: { | ||||
|             ...TEST_SETTINGS, | ||||
|             modeling: { | ||||
|               ...TEST_SETTINGS.modeling, | ||||
|               showScaleGrid: true, | ||||
|             }, | ||||
|           }, | ||||
|         }), | ||||
|       } | ||||
|     ) | ||||
|  | ||||
|     const u = await getUtils(page) | ||||
|     const stream = page.getByTestId('stream') | ||||
|     const mask = [ | ||||
|       page.locator('#app-header'), | ||||
|       page.locator('#sidebar-top-ribbon'), | ||||
|       page.locator('#sidebar-bottom-ribbon'), | ||||
|     ] | ||||
|  | ||||
|     await page.setViewportSize({ width: 1200, height: 500 }) | ||||
|     await page.goto('/') | ||||
|     await u.waitForAuthSkipAppStart() | ||||
|  | ||||
|     await u.openDebugPanel() | ||||
|     // wait for execution done | ||||
|     await expect( | ||||
|       page.locator('[data-message-type="execution-done"]') | ||||
|     ).toHaveCount(2) | ||||
|     await u.closeDebugPanel() | ||||
|     await u.closeKclCodePanel() | ||||
|     // TODO: Find a way to truly know that the objects have finished | ||||
|     // rendering, because an execution-done message is not sufficient. | ||||
|     await page.waitForTimeout(1000) | ||||
|  | ||||
|     await expect(stream).toHaveScreenshot({ | ||||
|       maxDiffPixels: 100, | ||||
|       mask, | ||||
|     }) | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB | 
| Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 48 KiB | 
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB | 
| Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB | 
| Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB | 
| After Width: | Height: | Size: 12 KiB | 
| After Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 69 KiB | 
| Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 60 KiB | 
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 30 KiB | 
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 30 KiB | 
| Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 29 KiB | 
| Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 33 KiB | 
| Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 27 KiB | 
| @ -45,8 +45,8 @@ async function clearCommandLogs(page: Page) { | ||||
|   await page.getByTestId('clear-commands').click() | ||||
| } | ||||
|  | ||||
| async function expectCmdLog(page: Page, locatorStr: string) { | ||||
|   await expect(page.locator(locatorStr).last()).toBeVisible() | ||||
| async function expectCmdLog(page: Page, locatorStr: string, timeout = 5000) { | ||||
|   await expect(page.locator(locatorStr).last()).toBeVisible({ timeout }) | ||||
| } | ||||
|  | ||||
| async function waitForDefaultPlanesToBeVisible(page: Page) { | ||||
| @ -114,19 +114,45 @@ export const wiggleMove = async ( | ||||
|   dist: number, | ||||
|   ang: number, | ||||
|   amplitude: number, | ||||
|   freq: number | ||||
|   freq: number, | ||||
|   locator?: string | ||||
| ) => { | ||||
|   const tau = Math.PI * 2 | ||||
|   const deg = tau / 360 | ||||
|   const step = dist / steps | ||||
|   for (let i = 0, j = 0; i < dist; i += step, j += 1) { | ||||
|     if (locator) { | ||||
|       const isElVis = await page.locator(locator).isVisible() | ||||
|       if (isElVis) return | ||||
|     } | ||||
|     const [x1, y1] = [0, Math.sin((tau / steps) * j * freq) * amplitude] | ||||
|     const [x2, y2] = [ | ||||
|       Math.cos(-ang * deg) * i - Math.sin(-ang * deg) * y1, | ||||
|       Math.sin(-ang * deg) * i + Math.cos(-ang * deg) * y1, | ||||
|     ] | ||||
|     const [xr, yr] = [x2, y2] | ||||
|     await page.mouse.move(x + xr, y + yr, { steps: 2 }) | ||||
|     await page.mouse.move(x + xr, y + yr, { steps: 5 }) | ||||
|   } | ||||
| } | ||||
|  | ||||
| export const circleMove = async ( | ||||
|   page: any, | ||||
|   x: number, | ||||
|   y: number, | ||||
|   steps: number, | ||||
|   diameter: number, | ||||
|   locator?: string | ||||
| ) => { | ||||
|   const tau = Math.PI * 2 | ||||
|   const step = tau / steps | ||||
|   for (let i = 0; i < tau; i += step) { | ||||
|     if (locator) { | ||||
|       const isElVis = await page.locator(locator).isVisible() | ||||
|       if (isElVis) return | ||||
|     } | ||||
|     const [x1, y1] = [Math.cos(i) * diameter, Math.sin(i) * diameter] | ||||
|     const [xr, yr] = [x1, y1] | ||||
|     await page.mouse.move(x + xr, y + yr, { steps: 5 }) | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -151,11 +177,11 @@ export const getMovementUtils = (opts: any) => { | ||||
|  | ||||
|   // Make it easier to click around from center ("click [from] zero zero") | ||||
|   const click00 = (x: number, y: number) => | ||||
|     opts.page.mouse.click(opts.center.x + x, opts.center.y + y) | ||||
|     opts.page.mouse.click(opts.center.x + x, opts.center.y + y, { delay: 100 }) | ||||
|  | ||||
|   // Relative clicker, must keep state | ||||
|   let last = { x: 0, y: 0 } | ||||
|   const click00r = (x?: number, y?: number) => { | ||||
|   const click00r = async (x?: number, y?: number) => { | ||||
|     // reset relative coordinates when anything is undefined | ||||
|     if (x === undefined || y === undefined) { | ||||
|       last.x = 0 | ||||
| @ -163,17 +189,41 @@ export const getMovementUtils = (opts: any) => { | ||||
|       return | ||||
|     } | ||||
|  | ||||
|     const ret = click00(last.x + x, last.y + y) | ||||
|     await circleMove( | ||||
|       opts.page, | ||||
|       opts.center.x + last.x + x, | ||||
|       opts.center.y + last.y + y, | ||||
|       10, | ||||
|       10 | ||||
|     ) | ||||
|     await click00(last.x + x, last.y + y) | ||||
|     last.x += x | ||||
|     last.y += y | ||||
|  | ||||
|     // Returns the new absolute coordinate if you need it. | ||||
|     return ret.then(() => [last.x, last.y]) | ||||
|     return [last.x, last.y] | ||||
|   } | ||||
|  | ||||
|   return { toSU, click00r } | ||||
| } | ||||
|  | ||||
| async function waitForAuthAndLsp(page: Page) { | ||||
|   const waitForLspPromise = page.waitForEvent('console', async (message) => { | ||||
|     // it would be better to wait for a message that the kcl lsp has started by looking for the message  message.text().includes('[lsp] [window/logMessage]') | ||||
|     // but that doesn't seem to make it to the console for macos/safari :( | ||||
|     if (message.text().includes('start kcl lsp')) { | ||||
|       await new Promise((resolve) => setTimeout(resolve, 200)) | ||||
|       return true | ||||
|     } | ||||
|     return false | ||||
|   }) | ||||
|  | ||||
|   await page.goto('/') | ||||
|   await waitForPageLoad(page) | ||||
|  | ||||
|   return waitForLspPromise | ||||
| } | ||||
|  | ||||
| export async function getUtils(page: Page) { | ||||
|   // Chrome devtools protocol session only works in Chromium | ||||
|   const browserType = page.context().browser()?.browserType().name() | ||||
| @ -181,7 +231,7 @@ export async function getUtils(page: Page) { | ||||
|     browserType !== 'chromium' ? null : await page.context().newCDPSession(page) | ||||
|  | ||||
|   return { | ||||
|     waitForAuthSkipAppStart: () => waitForPageLoad(page), | ||||
|     waitForAuthSkipAppStart: () => waitForAuthAndLsp(page), | ||||
|     removeCurrentCode: () => removeCurrentCode(page), | ||||
|     sendCustomCmd: (cmd: EngineCommand) => sendCustomCmd(page, cmd), | ||||
|     updateCamPosition: async (xyz: [number, number, number]) => { | ||||
| @ -195,7 +245,8 @@ export async function getUtils(page: Page) { | ||||
|       await fillInput('z', xyz[2]) | ||||
|     }, | ||||
|     clearCommandLogs: () => clearCommandLogs(page), | ||||
|     expectCmdLog: (locatorStr: string) => expectCmdLog(page, locatorStr), | ||||
|     expectCmdLog: (locatorStr: string, timeout = 5000) => | ||||
|       expectCmdLog(page, locatorStr, timeout), | ||||
|     openKclCodePanel: () => openKclCodePanel(page), | ||||
|     closeKclCodePanel: () => closeKclCodePanel(page), | ||||
|     openDebugPanel: () => openDebugPanel(page), | ||||
| @ -267,11 +318,19 @@ export async function getUtils(page: Page) { | ||||
|         (screenshot.width * coords.y * pixMultiplier + | ||||
|           coords.x * pixMultiplier) * | ||||
|         4 // rbga is 4 channels | ||||
|       return Math.max( | ||||
|       const maxDiff = Math.max( | ||||
|         Math.abs(screenshot.data[index] - expected[0]), | ||||
|         Math.abs(screenshot.data[index + 1] - expected[1]), | ||||
|         Math.abs(screenshot.data[index + 2] - expected[2]) | ||||
|       ) | ||||
|       if (maxDiff > 4) { | ||||
|         console.log( | ||||
|           `Expected: ${expected} Actual: [${screenshot.data[index]}, ${ | ||||
|             screenshot.data[index + 1] | ||||
|           }, ${screenshot.data[index + 2]}]` | ||||
|         ) | ||||
|       } | ||||
|       return maxDiff | ||||
|     }, | ||||
|     doAndWaitForImageDiff: (fn: () => Promise<any>, diffCount = 200) => | ||||
|       new Promise(async (resolve) => { | ||||
|  | ||||
| @ -1,3 +0,0 @@ | ||||
| // comment | ||||
|  | ||||
| const hi = 5 + 4 | ||||
							
								
								
									
										64
									
								
								package.json
									
									
									
									
									
								
							
							
						
						| @ -1,49 +1,43 @@ | ||||
| { | ||||
|   "name": "untitled-app", | ||||
|   "version": "0.22.6", | ||||
|   "version": "0.22.7", | ||||
|   "private": true, | ||||
|   "dependencies": { | ||||
|     "@codemirror/autocomplete": "^6.16.0", | ||||
|     "@codemirror/autocomplete": "^6.16.3", | ||||
|     "@codemirror/commands": "^6.6.0", | ||||
|     "@codemirror/language": "^6.10.2", | ||||
|     "@codemirror/lint": "^6.8.1", | ||||
|     "@codemirror/search": "^6.5.6", | ||||
|     "@codemirror/state": "^6.4.1", | ||||
|     "@csstools/postcss-oklab-function": "^3.0.16", | ||||
|     "@fortawesome/fontawesome-svg-core": "^6.5.2", | ||||
|     "@fortawesome/free-brands-svg-icons": "^6.5.2", | ||||
|     "@fortawesome/free-solid-svg-icons": "^6.4.2", | ||||
|     "@fortawesome/react-fontawesome": "^0.2.0", | ||||
|     "@headlessui/react": "^1.7.19", | ||||
|     "@headlessui/tailwindcss": "^0.2.0", | ||||
|     "@kittycad/lib": "^0.0.67", | ||||
|     "@lezer/javascript": "^1.4.9", | ||||
|     "@open-rpc/client-js": "^1.8.1", | ||||
|     "@kittycad/lib": "^0.0.69", | ||||
|     "@react-hook/resize-observer": "^2.0.1", | ||||
|     "@replit/codemirror-interact": "^6.3.1", | ||||
|     "@tauri-apps/api": "2.0.0-beta.12", | ||||
|     "@tauri-apps/plugin-dialog": "^2.0.0-beta.2", | ||||
|     "@tauri-apps/plugin-fs": "^2.0.0-beta.3", | ||||
|     "@tauri-apps/plugin-fs": "^2.0.0-beta.5", | ||||
|     "@tauri-apps/plugin-http": "^2.0.0-beta.2", | ||||
|     "@tauri-apps/plugin-os": "^2.0.0-beta.3", | ||||
|     "@tauri-apps/plugin-process": "^2.0.0-beta.2", | ||||
|     "@tauri-apps/plugin-shell": "^2.0.0-beta.2", | ||||
|     "@tauri-apps/plugin-updater": "^2.0.0-beta.3", | ||||
|     "@testing-library/jest-dom": "^5.14.1", | ||||
|     "@testing-library/react": "^15.0.2", | ||||
|     "@testing-library/user-event": "^14.5.2", | ||||
|     "@ts-stack/markdown": "^1.5.0", | ||||
|     "@tweenjs/tween.js": "^23.1.1", | ||||
|     "@types/node": "^18.19.31", | ||||
|     "@types/react": "^18.3.2", | ||||
|     "@types/react-dom": "^18.2.25", | ||||
|     "@uiw/react-codemirror": "^4.21.25", | ||||
|     "@xstate/inspect": "^0.8.0", | ||||
|     "@xstate/react": "^3.2.2", | ||||
|     "crypto-js": "^4.2.0", | ||||
|     "debounce-promise": "^3.1.2", | ||||
|     "codemirror": "^6.0.1", | ||||
|     "decamelize": "^6.0.0", | ||||
|     "formik": "^2.4.6", | ||||
|     "fuse.js": "^7.0.0", | ||||
|     "html2canvas-pro": "^1.4.3", | ||||
|     "http-server": "^14.1.1", | ||||
|     "html2canvas-pro": "^1.5.0", | ||||
|     "json-rpc-2.0": "^1.6.0", | ||||
|     "jszip": "^3.10.1", | ||||
|     "node-fetch": "^3.3.2", | ||||
|     "re-resizable": "^6.9.11", | ||||
|     "react": "^18.3.1", | ||||
|     "react-dom": "^18.2.0", | ||||
| @ -54,20 +48,15 @@ | ||||
|     "react-modal-promise": "^1.0.2", | ||||
|     "react-router-dom": "^6.23.1", | ||||
|     "sketch-helpers": "^0.0.4", | ||||
|     "swr": "^2.2.5", | ||||
|     "three": "^0.164.1", | ||||
|     "ts-node": "^10.9.2", | ||||
|     "typescript": "^5.4.5", | ||||
|     "ua-parser-js": "^1.0.37", | ||||
|     "uuid": "^9.0.1", | ||||
|     "vitest": "^1.6.0", | ||||
|     "vscode-jsonrpc": "^8.2.1", | ||||
|     "vscode-languageserver-protocol": "^3.17.5", | ||||
|     "wasm-pack": "^0.12.1", | ||||
|     "vscode-uri": "^3.0.8", | ||||
|     "web-vitals": "^3.5.2", | ||||
|     "ws": "^8.17.0", | ||||
|     "xstate": "^4.38.2", | ||||
|     "zustand": "^4.5.2" | ||||
|     "xstate": "^4.38.2" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "start": "vite", | ||||
| @ -84,11 +73,11 @@ | ||||
|     "test:e2e:tauri": "E2E_TAURI_ENABLED=true TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' wdio run wdio.conf.ts", | ||||
|     "simpleserver:ci": "yarn pretest && http-server ./public --cors -p 3000 &", | ||||
|     "simpleserver": "yarn pretest && http-server ./public --cors -p 3000", | ||||
|     "fmt": "prettier --write ./src *.ts *.json *.js ./e2e", | ||||
|     "fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e", | ||||
|     "fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages", | ||||
|     "fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages", | ||||
|     "fetch:wasm": "./get-latest-wasm-bundle.sh", | ||||
|     "build:wasm-dev": "(cd src/wasm-lib && wasm-pack build --dev --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt", | ||||
|     "build:wasm": "(cd src/wasm-lib && wasm-pack build --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt", | ||||
|     "build:wasm": "(cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings) && cp src/wasm-lib/pkg/wasm_lib_bg.wasm public && yarn fmt", | ||||
|     "build:wasm-clean": "yarn wasm-prep && yarn build:wasm", | ||||
|     "remove-importmeta": "sed -i 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\"; sed -i '' 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\" || echo \"sed for both mac and linux\"", | ||||
|     "wasm-prep": "rm -rf src/wasm-lib/pkg && mkdir src/wasm-lib/pkg && rm -rf src/wasm-lib/kcl/bindings", | ||||
| @ -120,13 +109,16 @@ | ||||
|     "@babel/plugin-proposal-private-property-in-object": "^7.21.11", | ||||
|     "@babel/preset-env": "^7.24.3", | ||||
|     "@iarna/toml": "^2.2.5", | ||||
|     "@playwright/test": "^1.43.1", | ||||
|     "@tauri-apps/cli": "^2.0.0-beta.13", | ||||
|     "@types/crypto-js": "^4.2.2", | ||||
|     "@types/debounce-promise": "^3.1.9", | ||||
|     "@playwright/test": "^1.44.1", | ||||
|     "@tauri-apps/cli": "==2.0.0-beta.13", | ||||
|     "@testing-library/jest-dom": "^5.14.1", | ||||
|     "@testing-library/react": "^15.0.2", | ||||
|     "@types/mocha": "^10.0.6", | ||||
|     "@types/node": "^18.19.31", | ||||
|     "@types/pixelmatch": "^5.2.6", | ||||
|     "@types/pngjs": "^6.0.4", | ||||
|     "@types/react": "^18.3.2", | ||||
|     "@types/react-dom": "^18.2.25", | ||||
|     "@types/react-modal": "^3.16.3", | ||||
|     "@types/three": "^0.163.0", | ||||
|     "@types/ua-parser-js": "^0.7.39", | ||||
| @ -146,21 +138,27 @@ | ||||
|     "eslint": "^8.57.0", | ||||
|     "eslint-config-react-app": "^7.0.1", | ||||
|     "eslint-plugin-css-modules": "^2.12.0", | ||||
|     "eslint-plugin-suggest-no-throw": "^1.0.0", | ||||
|     "happy-dom": "^14.3.10", | ||||
|     "http-server": "^14.1.1", | ||||
|     "husky": "^9.0.11", | ||||
|     "node-fetch": "^3.3.2", | ||||
|     "pixelmatch": "^5.3.0", | ||||
|     "pngjs": "^7.0.0", | ||||
|     "postcss": "^8.4.31", | ||||
|     "postinstall-postinstall": "^2.1.0", | ||||
|     "prettier": "^2.8.0", | ||||
|     "prettier": "^2.8.8", | ||||
|     "setimmediate": "^1.0.5", | ||||
|     "tailwindcss": "^3.4.1", | ||||
|     "vite": "^5.2.9", | ||||
|     "vite-plugin-eslint": "^1.8.1", | ||||
|     "vite-plugin-package-version": "^1.1.0", | ||||
|     "vite-tsconfig-paths": "^4.3.2", | ||||
|     "vitest": "^1.6.0", | ||||
|     "vitest-webgl-canvas-mock": "^1.1.0", | ||||
|     "wait-on": "^7.2.0", | ||||
|     "wasm-pack": "^0.12.1", | ||||
|     "ws": "^8.17.0", | ||||
|     "yarn": "^1.22.22" | ||||
|   } | ||||
| } | ||||
|  | ||||
							
								
								
									
										6
									
								
								packages/codemirror-lsp-client/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,6 @@ | ||||
| node_modules | ||||
| build | ||||
| dist | ||||
| tsconfig.tsbuildinfo | ||||
| *.d.ts | ||||
| *.js | ||||
							
								
								
									
										35
									
								
								packages/codemirror-lsp-client/package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,35 @@ | ||||
| { | ||||
|   "name": "@kittycad/codemirror-lsp-client", | ||||
|   "version": "1.0.0", | ||||
|   "description": "An LSP client for the codemirror editor.", | ||||
|   "main": "src/index.ts", | ||||
|   "exports": { | ||||
|     "import": "./dist/index.js", | ||||
|     "require": "./dist/index.js" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "build": "tsc" | ||||
|   }, | ||||
|   "types": "dist/index.d.ts", | ||||
|   "module": "dist/index.js", | ||||
|   "type": "module", | ||||
|   "repository": "https://github.com/KittyCAD/modeling-app", | ||||
|   "author": "Zoo Engineering Team", | ||||
|   "license": "MIT", | ||||
|   "private": false, | ||||
|   "dependencies": { | ||||
|     "@codemirror/autocomplete": "^6.16.3", | ||||
|     "@codemirror/language": "^6.10.2", | ||||
|     "@codemirror/state": "^6.4.1", | ||||
|     "@lezer/highlight": "^1.2.0", | ||||
|     "@ts-stack/markdown": "^1.5.0", | ||||
|     "json-rpc-2.0": "^1.7.0", | ||||
|     "typescript": "^5.5.2", | ||||
|     "vscode-languageserver-protocol": "^3.17.5", | ||||
|     "vscode-uri": "^3.0.8" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/node": "^20.14.9", | ||||
|     "ts-node": "^10.9.2" | ||||
|   } | ||||
| } | ||||
| @ -1,10 +1,10 @@ | ||||
| import * as vsrpc from 'vscode-jsonrpc' | ||||
| 
 | ||||
| import { Codec } from '.' | ||||
| import Bytes from './bytes' | ||||
| import PromiseMap from './map' | ||||
| import Queue from './queue' | ||||
| import Tracer from '../tracer' | ||||
| import { Codec } from '../codec' | ||||
| import Tracer from './tracer' | ||||
| import PromiseMap from './map' | ||||
| 
 | ||||
| export default class StreamDemuxer extends Queue<Uint8Array> { | ||||
|   readonly responses: PromiseMap<number | string, vsrpc.ResponseMessage> = | ||||
| @ -15,9 +15,12 @@ export default class StreamDemuxer extends Queue<Uint8Array> { | ||||
|     new Queue<vsrpc.RequestMessage>() | ||||
| 
 | ||||
|   readonly #start: Promise<void> | ||||
|   private trace: boolean = false | ||||
| 
 | ||||
|   constructor() { | ||||
|   constructor(trace?: boolean) { | ||||
|     super() | ||||
|     this.trace = trace || false | ||||
| 
 | ||||
|     this.#start = this.start() | ||||
|   } | ||||
| 
 | ||||
| @ -38,7 +41,9 @@ export default class StreamDemuxer extends Queue<Uint8Array> { | ||||
| 
 | ||||
|           // try to parse the content-length from the headers
 | ||||
|           const length = parseInt(match[1]) | ||||
|           if (isNaN(length)) throw new Error('invalid content length') | ||||
| 
 | ||||
|           if (isNaN(length)) | ||||
|             return Promise.reject(new Error('invalid content length')) | ||||
| 
 | ||||
|           // slice the headers since we now have the content length
 | ||||
|           buffer = buffer.slice(match[0].length) | ||||
| @ -62,7 +67,10 @@ export default class StreamDemuxer extends Queue<Uint8Array> { | ||||
|         contentLength = null | ||||
| 
 | ||||
|         const message = JSON.parse(delimited) as vsrpc.Message | ||||
|         Tracer.server(message) | ||||
| 
 | ||||
|         if (this.trace) { | ||||
|           Tracer.server(message) | ||||
|         } | ||||
| 
 | ||||
|         // demux the message stream
 | ||||
|         if (vsrpc.Message.isResponse(message) && null != message.id) { | ||||
| @ -83,7 +91,9 @@ export default class StreamDemuxer extends Queue<Uint8Array> { | ||||
| 
 | ||||
|   add(bytes: Uint8Array): void { | ||||
|     const message = Codec.decode(bytes) as vsrpc.Message | ||||
|     Tracer.server(message) | ||||
|     if (this.trace) { | ||||
|       Tracer.server(message) | ||||
|     } | ||||
| 
 | ||||
|     // demux the message stream
 | ||||
|     if (vsrpc.Message.isResponse(message) && null != message.id) { | ||||
| @ -1,12 +1,16 @@ | ||||
| import * as jsrpc from 'json-rpc-2.0' | ||||
| import * as vsrpc from 'vscode-jsonrpc' | ||||
| 
 | ||||
| import Bytes from './codec/bytes' | ||||
| import StreamDemuxer from './codec/demuxer' | ||||
| import Headers from './codec/headers' | ||||
| import Queue from './codec/queue' | ||||
| import Bytes from './bytes' | ||||
| import StreamDemuxer from './demuxer' | ||||
| import Headers from './headers' | ||||
| import Queue from './queue' | ||||
| import Tracer from './tracer' | ||||
| import { LspWorkerEventType, LspWorker } from './types' | ||||
| 
 | ||||
| export enum LspWorkerEventType { | ||||
|   Init = 'init', | ||||
|   Call = 'call', | ||||
| } | ||||
| 
 | ||||
| export const encoder = new TextEncoder() | ||||
| export const decoder = new TextDecoder() | ||||
| @ -33,16 +37,24 @@ export class IntoServer | ||||
|   implements AsyncGenerator<Uint8Array, never, void> | ||||
| { | ||||
|   private worker: Worker | null = null | ||||
|   private type_: LspWorker | null = null | ||||
|   constructor(type_?: LspWorker, worker?: Worker) { | ||||
|   private type_: String | null = null | ||||
| 
 | ||||
|   private trace: boolean = false | ||||
| 
 | ||||
|   constructor(type_?: String, worker?: Worker, trace?: boolean) { | ||||
|     super() | ||||
|     if (worker && type_) { | ||||
|       this.worker = worker | ||||
|       this.type_ = type_ | ||||
|     } | ||||
| 
 | ||||
|     this.trace = trace || false | ||||
|   } | ||||
|   enqueue(item: Uint8Array): void { | ||||
|     Tracer.client(Headers.remove(decoder.decode(item))) | ||||
|     if (this.trace) { | ||||
|       Tracer.client(Headers.remove(decoder.decode(item))) | ||||
|     } | ||||
| 
 | ||||
|     if (this.worker) { | ||||
|       this.worker.postMessage({ | ||||
|         worker: this.type_, | ||||
| @ -67,7 +79,13 @@ export interface FromServer extends WritableStream<Uint8Array> { | ||||
| 
 | ||||
| // eslint-disable-next-line @typescript-eslint/no-namespace
 | ||||
| export namespace FromServer { | ||||
|   export function create(): FromServer { | ||||
|     return new StreamDemuxer() | ||||
|   export function create(): FromServer | Error { | ||||
|     // Calls private method .start() which can throw.
 | ||||
|     // This is an odd one of the bunch but try/catch seems most suitable here.
 | ||||
|     try { | ||||
|       return new StreamDemuxer(false) | ||||
|     } catch (e: any) { | ||||
|       return e | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										13
									
								
								packages/codemirror-lsp-client/src/client/codec/tracer.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,13 @@ | ||||
| import { Message } from 'vscode-languageserver-protocol' | ||||
|  | ||||
| export default class Tracer { | ||||
|   static client(message: string): void { | ||||
|     console.log('lsp client message', message) | ||||
|   } | ||||
|  | ||||
|   static server(input: string | Message): void { | ||||
|     const message: string = | ||||
|       typeof input === 'string' ? input : JSON.stringify(input) | ||||
|     console.log('lsp server message', message) | ||||
|   } | ||||
| } | ||||
| @ -1,16 +1,8 @@ | ||||
| import type * as LSP from 'vscode-languageserver-protocol' | ||||
| import Client from './client' | ||||
| import { SemanticToken, deserializeTokens } from './kcl/semantic_tokens' | ||||
| import { LanguageServerPlugin } from 'editor/plugins/lsp/plugin' | ||||
| import { CopilotLspCompletionParams } from 'wasm-lib/kcl/bindings/CopilotLspCompletionParams' | ||||
| import { CopilotCompletionResponse } from 'wasm-lib/kcl/bindings/CopilotCompletionResponse' | ||||
| import { CopilotAcceptCompletionParams } from 'wasm-lib/kcl/bindings/CopilotAcceptCompletionParams' | ||||
| import { CopilotRejectCompletionParams } from 'wasm-lib/kcl/bindings/CopilotRejectCompletionParams' | ||||
| import { UpdateUnitsParams } from 'wasm-lib/kcl/bindings/UpdateUnitsParams' | ||||
| import { UpdateCanExecuteParams } from 'wasm-lib/kcl/bindings/UpdateCanExecuteParams' | ||||
| import { UpdateUnitsResponse } from 'wasm-lib/kcl/bindings/UpdateUnitsResponse' | ||||
| import { UpdateCanExecuteResponse } from 'wasm-lib/kcl/bindings/UpdateCanExecuteResponse' | ||||
| import { LspWorker } from './types' | ||||
| 
 | ||||
| import { FromServer, IntoServer } from './codec' | ||||
| import Client from './jsonrpc' | ||||
| import { LanguageServerPlugin } from '../plugin/lsp' | ||||
| 
 | ||||
| // https://microsoft.github.io/language-server-protocol/specifications/specification-current/
 | ||||
| 
 | ||||
| @ -31,12 +23,6 @@ interface LSPRequestMap { | ||||
|     LSP.TextEdit[] | null | ||||
|   ] | ||||
|   'textDocument/foldingRange': [LSP.FoldingRangeParams, LSP.FoldingRange[]] | ||||
|   'copilot/getCompletions': [ | ||||
|     CopilotLspCompletionParams, | ||||
|     CopilotCompletionResponse | ||||
|   ] | ||||
|   'kcl/updateUnits': [UpdateUnitsParams, UpdateUnitsResponse | null] | ||||
|   'kcl/updateCanExecute': [UpdateCanExecuteParams, UpdateCanExecuteResponse] | ||||
| } | ||||
| 
 | ||||
| // Client to server
 | ||||
| @ -49,21 +35,13 @@ interface LSPNotifyMap { | ||||
|   'workspace/didCreateFiles': LSP.CreateFilesParams | ||||
|   'workspace/didRenameFiles': LSP.RenameFilesParams | ||||
|   'workspace/didDeleteFiles': LSP.DeleteFilesParams | ||||
|   'copilot/notifyAccepted': CopilotAcceptCompletionParams | ||||
|   'copilot/notifyRejected': CopilotRejectCompletionParams | ||||
| } | ||||
| 
 | ||||
| export interface LanguageServerClientOptions { | ||||
|   client: Client | ||||
|   name: LspWorker | ||||
| } | ||||
| 
 | ||||
| export interface LanguageServerOptions { | ||||
|   // We assume this is the main project directory, we are currently working in.
 | ||||
|   workspaceFolders: LSP.WorkspaceFolder[] | ||||
|   documentUri: string | ||||
|   allowHTMLContent: boolean | ||||
|   client: LanguageServerClient | ||||
|   name: string | ||||
|   fromServer: FromServer | ||||
|   intoServer: IntoServer | ||||
|   initializedCallback: () => void | ||||
| } | ||||
| 
 | ||||
| export class LanguageServerClient { | ||||
| @ -76,18 +54,18 @@ export class LanguageServerClient { | ||||
| 
 | ||||
|   public initializePromise: Promise<void> | ||||
| 
 | ||||
|   private isUpdatingSemanticTokens: boolean = false | ||||
|   private semanticTokens: SemanticToken[] = [] | ||||
|   private queuedUids: string[] = [] | ||||
| 
 | ||||
|   constructor(options: LanguageServerClientOptions) { | ||||
|     this.plugins = [] | ||||
|     this.client = options.client | ||||
|     this.name = options.name | ||||
|     this.plugins = [] | ||||
| 
 | ||||
|     this.client = new Client( | ||||
|       options.fromServer, | ||||
|       options.intoServer, | ||||
|       options.initializedCallback | ||||
|     ) | ||||
| 
 | ||||
|     this.ready = false | ||||
| 
 | ||||
|     this.queuedUids = [] | ||||
|     this.initializePromise = this.initialize() | ||||
|   } | ||||
| 
 | ||||
| @ -111,19 +89,10 @@ export class LanguageServerClient { | ||||
| 
 | ||||
|   textDocumentDidOpen(params: LSP.DidOpenTextDocumentParams) { | ||||
|     this.notify('textDocument/didOpen', params) | ||||
| 
 | ||||
|     // Update the facet of the plugins to the correct value.
 | ||||
|     for (const plugin of this.plugins) { | ||||
|       plugin.documentUri = params.textDocument.uri | ||||
|       plugin.languageId = params.textDocument.languageId | ||||
|     } | ||||
| 
 | ||||
|     this.updateSemanticTokens(params.textDocument.uri) | ||||
|   } | ||||
| 
 | ||||
|   textDocumentDidChange(params: LSP.DidChangeTextDocumentParams) { | ||||
|     this.notify('textDocument/didChange', params) | ||||
|     this.updateSemanticTokens(params.textDocument.uri) | ||||
|   } | ||||
| 
 | ||||
|   textDocumentDidClose(params: LSP.DidCloseTextDocumentParams) { | ||||
| @ -134,18 +103,9 @@ export class LanguageServerClient { | ||||
|     added: LSP.WorkspaceFolder[], | ||||
|     removed: LSP.WorkspaceFolder[] | ||||
|   ) { | ||||
|     // Add all the current workspace folders in the plugin to removed.
 | ||||
|     for (const plugin of this.plugins) { | ||||
|       removed.push(...plugin.workspaceFolders) | ||||
|     } | ||||
|     this.notify('workspace/didChangeWorkspaceFolders', { | ||||
|       event: { added, removed }, | ||||
|     }) | ||||
| 
 | ||||
|     // Add all the new workspace folders to the plugins.
 | ||||
|     for (const plugin of this.plugins) { | ||||
|       plugin.workspaceFolders = added | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   workspaceDidCreateFiles(params: LSP.CreateFilesParams) { | ||||
| @ -160,33 +120,13 @@ export class LanguageServerClient { | ||||
|     this.notify('workspace/didDeleteFiles', params) | ||||
|   } | ||||
| 
 | ||||
|   async updateSemanticTokens(uri: string) { | ||||
|   async textDocumentSemanticTokensFull(params: LSP.SemanticTokensParams) { | ||||
|     const serverCapabilities = this.getServerCapabilities() | ||||
|     if (!serverCapabilities.semanticTokensProvider) { | ||||
|       return | ||||
|     } | ||||
| 
 | ||||
|     // Make sure we can only run, if we aren't already running.
 | ||||
|     if (!this.isUpdatingSemanticTokens) { | ||||
|       this.isUpdatingSemanticTokens = true | ||||
| 
 | ||||
|       const result = await this.request('textDocument/semanticTokens/full', { | ||||
|         textDocument: { | ||||
|           uri, | ||||
|         }, | ||||
|       }) | ||||
| 
 | ||||
|       this.semanticTokens = deserializeTokens( | ||||
|         result.data, | ||||
|         this.getServerCapabilities().semanticTokensProvider | ||||
|       ) | ||||
| 
 | ||||
|       this.isUpdatingSemanticTokens = false | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   getSemanticTokens(): SemanticToken[] { | ||||
|     return this.semanticTokens | ||||
|     return this.request('textDocument/semanticTokens/full', params) | ||||
|   } | ||||
| 
 | ||||
|   async textDocumentHover(params: LSP.HoverParams) { | ||||
| @ -239,6 +179,10 @@ export class LanguageServerClient { | ||||
|     return this.client.request(method, params) as Promise<LSPRequestMap[K][1]> | ||||
|   } | ||||
| 
 | ||||
|   requestCustom<P, R>(method: string, params: P): Promise<R> { | ||||
|     return this.client.request(method, params) as Promise<R> | ||||
|   } | ||||
| 
 | ||||
|   private notify<K extends keyof LSPNotifyMap>( | ||||
|     method: K, | ||||
|     params: LSPNotifyMap[K] | ||||
| @ -246,44 +190,8 @@ export class LanguageServerClient { | ||||
|     return this.client.notify(method, params) | ||||
|   } | ||||
| 
 | ||||
|   async getCompletion(params: CopilotLspCompletionParams) { | ||||
|     const response = await this.request('copilot/getCompletions', params) | ||||
|     //
 | ||||
|     this.queuedUids = [...response.completions.map((c) => c.uuid)] | ||||
|     return response | ||||
|   } | ||||
| 
 | ||||
|   async accept(uuid: string) { | ||||
|     const badUids = this.queuedUids.filter((u) => u !== uuid) | ||||
|     this.queuedUids = [] | ||||
|     this.acceptCompletion({ uuid }) | ||||
|     this.rejectCompletions({ uuids: badUids }) | ||||
|   } | ||||
| 
 | ||||
|   async reject() { | ||||
|     const badUids = this.queuedUids | ||||
|     this.queuedUids = [] | ||||
|     this.rejectCompletions({ uuids: badUids }) | ||||
|   } | ||||
| 
 | ||||
|   acceptCompletion(params: CopilotAcceptCompletionParams) { | ||||
|     this.notify('copilot/notifyAccepted', params) | ||||
|   } | ||||
| 
 | ||||
|   rejectCompletions(params: CopilotRejectCompletionParams) { | ||||
|     this.notify('copilot/notifyRejected', params) | ||||
|   } | ||||
| 
 | ||||
|   async updateUnits( | ||||
|     params: UpdateUnitsParams | ||||
|   ): Promise<UpdateUnitsResponse | null> { | ||||
|     return await this.request('kcl/updateUnits', params) | ||||
|   } | ||||
| 
 | ||||
|   async updateCanExecute( | ||||
|     params: UpdateCanExecuteParams | ||||
|   ): Promise<UpdateCanExecuteResponse> { | ||||
|     return await this.request('kcl/updateCanExecute', params) | ||||
|   notifyCustom<P>(method: string, params: P): void { | ||||
|     return this.client.notify(method, params) | ||||
|   } | ||||
| 
 | ||||
|   private processNotifications(notification: LSP.NotificationMessage) { | ||||
| @ -66,8 +66,13 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|   #fromServer: FromServer | ||||
|   private serverCapabilities: LSP.ServerCapabilities<any> = {} | ||||
|   private notifyFn: ((message: LSP.NotificationMessage) => void) | null = null | ||||
|   private initializedCallback: () => void | ||||
| 
 | ||||
|   constructor(fromServer: FromServer, intoServer: IntoServer) { | ||||
|   constructor( | ||||
|     fromServer: FromServer, | ||||
|     intoServer: IntoServer, | ||||
|     initializedCallback: () => void | ||||
|   ) { | ||||
|     super( | ||||
|       new jsrpc.JSONRPCServer(), | ||||
|       new jsrpc.JSONRPCClient(async (json: jsrpc.JSONRPCRequest) => { | ||||
| @ -81,6 +86,7 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|       }) | ||||
|     ) | ||||
|     this.#fromServer = fromServer | ||||
|     this.initializedCallback = initializedCallback | ||||
|   } | ||||
| 
 | ||||
|   async start(): Promise<void> { | ||||
| @ -119,10 +125,14 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|       // Register a server capability.
 | ||||
|       params.registrations.forEach( | ||||
|         (capabilityRegistration: LSP.Registration) => { | ||||
|           this.serverCapabilities = registerServerCapability( | ||||
|           const caps = registerServerCapability( | ||||
|             this.serverCapabilities, | ||||
|             capabilityRegistration | ||||
|           ) | ||||
|           if (caps instanceof Error) { | ||||
|             return (this.serverCapabilities = {}) | ||||
|           } | ||||
|           this.serverCapabilities = caps | ||||
|         } | ||||
|       ) | ||||
|     }) | ||||
| @ -132,10 +142,14 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|       // Unregister a server capability.
 | ||||
|       params.unregisterations.forEach( | ||||
|         (capabilityUnregistration: LSP.Unregistration) => { | ||||
|           this.serverCapabilities = unregisterServerCapability( | ||||
|           const caps = unregisterServerCapability( | ||||
|             this.serverCapabilities, | ||||
|             capabilityUnregistration | ||||
|           ) | ||||
|           if (caps instanceof Error) { | ||||
|             return (this.serverCapabilities = {}) | ||||
|           } | ||||
|           this.serverCapabilities = caps | ||||
|         } | ||||
|       ) | ||||
|     }) | ||||
| @ -146,7 +160,7 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|       { | ||||
|         processId: null, | ||||
|         clientInfo: { | ||||
|           name: 'kcl-language-client', | ||||
|           name: 'codemirror-lsp-client', | ||||
|         }, | ||||
|         capabilities: client_capabilities, | ||||
|         rootUri: null, | ||||
| @ -158,6 +172,8 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { | ||||
|     // notify "initialized": client --> server
 | ||||
|     this.notify(LSP.InitializedNotification.type.method, {}) | ||||
| 
 | ||||
|     this.initializedCallback() | ||||
| 
 | ||||
|     await Promise.all( | ||||
|       this.afterInitializedHooks.map((f: () => Promise<void>) => f()) | ||||
|     ) | ||||
| @ -41,7 +41,7 @@ const ServerCapabilitiesProviders: IMethodServerCapabilityProviderDictionary = { | ||||
| function registerServerCapability( | ||||
|   serverCapabilities: ServerCapabilities, | ||||
|   registration: Registration | ||||
| ): ServerCapabilities { | ||||
| ): ServerCapabilities | Error { | ||||
|   const serverCapabilitiesCopy = JSON.parse( | ||||
|     JSON.stringify(serverCapabilities) | ||||
|   ) as IFlexibleServerCapabilities | ||||
| @ -58,7 +58,7 @@ function registerServerCapability( | ||||
|       ) | ||||
|     } | ||||
|   } else { | ||||
|     throw new Error('Could not register server capability.') | ||||
|     return new Error('Could not register server capability.') | ||||
|   } | ||||
| 
 | ||||
|   return serverCapabilitiesCopy | ||||
							
								
								
									
										113
									
								
								packages/codemirror-lsp-client/src/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,113 @@ | ||||
| import { autocompletion } from '@codemirror/autocomplete' | ||||
| import { foldService, syntaxTree } from '@codemirror/language' | ||||
| import { Extension, EditorState } from '@codemirror/state' | ||||
| import { ViewPlugin } from '@codemirror/view' | ||||
|  | ||||
| import { CompletionTriggerKind } from 'vscode-languageserver-protocol' | ||||
|  | ||||
| import { | ||||
|   docPathFacet, | ||||
|   LanguageServerPlugin, | ||||
|   LanguageServerPluginSpec, | ||||
|   languageId, | ||||
|   workspaceFolders, | ||||
|   LanguageServerOptions, | ||||
| } from './plugin/lsp' | ||||
| import { offsetToPos } from './plugin/util' | ||||
|  | ||||
| export type { LanguageServerClientOptions } from './client' | ||||
| export { LanguageServerClient } from './client' | ||||
| export { | ||||
|   Codec, | ||||
|   FromServer, | ||||
|   IntoServer, | ||||
|   LspWorkerEventType, | ||||
| } from './client/codec' | ||||
| export type { LanguageServerOptions } from './plugin/lsp' | ||||
| export type { TransactionInfo, RelevantUpdate } from './plugin/annotations' | ||||
| export { updateInfo, TransactionAnnotation } from './plugin/annotations' | ||||
| export { | ||||
|   LanguageServerPlugin, | ||||
|   LanguageServerPluginSpec, | ||||
|   docPathFacet, | ||||
|   languageId, | ||||
|   workspaceFolders, | ||||
| } from './plugin/lsp' | ||||
| export { posToOffset, offsetToPos } from './plugin/util' | ||||
|  | ||||
| export function lspPlugin(options: LanguageServerOptions): Extension { | ||||
|   let plugin: LanguageServerPlugin | null = null | ||||
|   const viewPlugin = ViewPlugin.define( | ||||
|     (view) => (plugin = new LanguageServerPlugin(options, view)), | ||||
|     new LanguageServerPluginSpec() | ||||
|   ) | ||||
|  | ||||
|   let ext = [ | ||||
|     docPathFacet.of(options.documentUri), | ||||
|     languageId.of('kcl'), | ||||
|     workspaceFolders.of(options.workspaceFolders), | ||||
|     viewPlugin, | ||||
|     foldService.of((state: EditorState, lineStart: number, lineEnd: number) => { | ||||
|       if (plugin == null) return null | ||||
|       // Get the folding ranges from the language server. | ||||
|       // Since this is async we directly need to update the folding ranges after. | ||||
|       return plugin?.foldingRange(lineStart, lineEnd) | ||||
|     }), | ||||
|   ] | ||||
|  | ||||
|   if (options.client.getServerCapabilities().completionProvider) { | ||||
|     ext.push( | ||||
|       autocompletion({ | ||||
|         defaultKeymap: false, | ||||
|         override: [ | ||||
|           async (context) => { | ||||
|             if (plugin === null) { | ||||
|               return null | ||||
|             } | ||||
|  | ||||
|             const { state, pos, explicit } = context | ||||
|  | ||||
|             let nodeBefore = syntaxTree(state).resolveInner(pos, -1) | ||||
|             if ( | ||||
|               nodeBefore.name === 'BlockComment' || | ||||
|               nodeBefore.name === 'LineComment' | ||||
|             ) | ||||
|               return null | ||||
|  | ||||
|             const line = state.doc.lineAt(pos) | ||||
|             let trigKind: CompletionTriggerKind = CompletionTriggerKind.Invoked | ||||
|             let trigChar: string | undefined | ||||
|             if ( | ||||
|               !explicit && | ||||
|               plugin.client | ||||
|                 .getServerCapabilities() | ||||
|                 .completionProvider?.triggerCharacters?.includes( | ||||
|                   line.text[pos - line.from - 1] | ||||
|                 ) | ||||
|             ) { | ||||
|               trigKind = CompletionTriggerKind.TriggerCharacter | ||||
|               trigChar = line.text[pos - line.from - 1] | ||||
|             } | ||||
|             if ( | ||||
|               trigKind === CompletionTriggerKind.Invoked && | ||||
|               !context.matchBefore(/\w+$/) | ||||
|             ) { | ||||
|               return null | ||||
|             } | ||||
|  | ||||
|             return await plugin.requestCompletion( | ||||
|               context, | ||||
|               offsetToPos(state.doc, pos), | ||||
|               { | ||||
|                 triggerKind: trigKind, | ||||
|                 triggerCharacter: trigChar, | ||||
|               } | ||||
|             ) | ||||
|           }, | ||||
|         ], | ||||
|       }) | ||||
|     ) | ||||
|   } | ||||
|  | ||||
|   return ext | ||||
| } | ||||
							
								
								
									
										131
									
								
								packages/codemirror-lsp-client/src/plugin/annotations.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,131 @@ | ||||
| import { hasNextSnippetField, pickedCompletion } from '@codemirror/autocomplete' | ||||
| import { Annotation, Transaction } from '@codemirror/state' | ||||
| import type { ViewUpdate } from '@codemirror/view' | ||||
|  | ||||
| export enum LspAnnotation { | ||||
|   SemanticTokens = 'semantic-tokens', | ||||
|   FormatCode = 'format-code', | ||||
|   Diagnostics = 'diagnostics', | ||||
| } | ||||
|  | ||||
| const lspEvent = Annotation.define<LspAnnotation>() | ||||
| export const lspSemanticTokensEvent = lspEvent.of(LspAnnotation.SemanticTokens) | ||||
| export const lspFormatCodeEvent = lspEvent.of(LspAnnotation.FormatCode) | ||||
| export const lspDiagnosticsEvent = lspEvent.of(LspAnnotation.Diagnostics) | ||||
|  | ||||
| export enum TransactionAnnotation { | ||||
|   Remote = 'remote', | ||||
|   UserSelect = 'user.select', | ||||
|   UserInput = 'user.input', | ||||
|   UserMove = 'user.move', | ||||
|   UserDelete = 'user.delete', | ||||
|   UserUndo = 'user.undo', | ||||
|   UserRedo = 'user.redo', | ||||
|  | ||||
|   SemanticTokens = 'SemanticTokens', | ||||
|   FormatCode = 'FormatCode', | ||||
|   Diagnostics = 'Diagnostics', | ||||
|  | ||||
|   PickedCompletion = 'PickedCompletion', | ||||
| } | ||||
|  | ||||
| export interface TransactionInfo { | ||||
|   annotations: TransactionAnnotation[] | ||||
|   time: number | null | ||||
|   docChanged: boolean | ||||
|   addToHistory: boolean | ||||
|   inSnippet: boolean | ||||
|   transaction: Transaction | ||||
| } | ||||
|  | ||||
| export const updateInfo = (update: ViewUpdate): TransactionInfo[] => { | ||||
|   let transactionInfos: TransactionInfo[] = [] | ||||
|  | ||||
|   for (const tr of update.transactions) { | ||||
|     let annotations: TransactionAnnotation[] = [] | ||||
|  | ||||
|     if (tr.isUserEvent('select')) { | ||||
|       annotations.push(TransactionAnnotation.UserSelect) | ||||
|     } | ||||
|  | ||||
|     if (tr.isUserEvent('input')) { | ||||
|       annotations.push(TransactionAnnotation.UserInput) | ||||
|     } | ||||
|     if (tr.isUserEvent('delete')) { | ||||
|       annotations.push(TransactionAnnotation.UserDelete) | ||||
|     } | ||||
|     if (tr.isUserEvent('undo')) { | ||||
|       annotations.push(TransactionAnnotation.UserUndo) | ||||
|     } | ||||
|     if (tr.isUserEvent('redo')) { | ||||
|       annotations.push(TransactionAnnotation.UserRedo) | ||||
|     } | ||||
|     if (tr.isUserEvent('move')) { | ||||
|       annotations.push(TransactionAnnotation.UserMove) | ||||
|     } | ||||
|  | ||||
|     if (tr.annotation(pickedCompletion) !== undefined) { | ||||
|       annotations.push(TransactionAnnotation.PickedCompletion) | ||||
|     } | ||||
|  | ||||
|     if (tr.annotation(lspSemanticTokensEvent.type) !== undefined) { | ||||
|       annotations.push(TransactionAnnotation.SemanticTokens) | ||||
|     } | ||||
|  | ||||
|     if (tr.annotation(lspFormatCodeEvent.type) !== undefined) { | ||||
|       annotations.push(TransactionAnnotation.FormatCode) | ||||
|     } | ||||
|  | ||||
|     if (tr.annotation(lspDiagnosticsEvent.type) !== undefined) { | ||||
|       annotations.push(TransactionAnnotation.Diagnostics) | ||||
|     } | ||||
|  | ||||
|     if (tr.annotation(Transaction.remote) !== undefined) { | ||||
|       annotations.push(TransactionAnnotation.Remote) | ||||
|     } | ||||
|  | ||||
|     transactionInfos.push({ | ||||
|       annotations, | ||||
|       time: tr.annotation(Transaction.time) || null, | ||||
|       docChanged: tr.docChanged, | ||||
|       addToHistory: tr.annotation(Transaction.addToHistory) || false, | ||||
|       inSnippet: hasNextSnippetField(update.state), | ||||
|       transaction: tr, | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   return transactionInfos | ||||
| } | ||||
|  | ||||
| export interface RelevantUpdate { | ||||
|   overall: boolean | ||||
|   userSelect: boolean | ||||
|   time: number | null | ||||
| } | ||||
|  | ||||
| export const relevantUpdate = (update: ViewUpdate): RelevantUpdate => { | ||||
|   const infos = updateInfo(update) | ||||
|   // Make sure we are not in a snippet | ||||
|   if (infos.some((info) => info.inSnippet)) { | ||||
|     return { | ||||
|       overall: false, | ||||
|       userSelect: false, | ||||
|       time: null, | ||||
|     } | ||||
|   } | ||||
|   return { | ||||
|     overall: infos.some( | ||||
|       (info) => | ||||
|         info.docChanged || | ||||
|         info.annotations.includes(TransactionAnnotation.UserInput) || | ||||
|         info.annotations.includes(TransactionAnnotation.UserDelete) || | ||||
|         info.annotations.includes(TransactionAnnotation.UserUndo) || | ||||
|         info.annotations.includes(TransactionAnnotation.UserRedo) || | ||||
|         info.annotations.includes(TransactionAnnotation.UserMove) | ||||
|     ), | ||||
|     userSelect: infos.some((info) => | ||||
|       info.annotations.includes(TransactionAnnotation.UserSelect) | ||||
|     ), | ||||
|     time: infos.length ? infos[0].time : null, | ||||
|   } | ||||
| } | ||||
							
								
								
									
										51
									
								
								packages/codemirror-lsp-client/src/plugin/autocomplete.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,51 @@ | ||||
| import { | ||||
|   acceptCompletion, | ||||
|   clearSnippet, | ||||
|   closeCompletion, | ||||
|   hasNextSnippetField, | ||||
|   moveCompletionSelection, | ||||
|   nextSnippetField, | ||||
|   prevSnippetField, | ||||
|   startCompletion, | ||||
| } from '@codemirror/autocomplete' | ||||
| import { Prec } from '@codemirror/state' | ||||
| import { EditorView, keymap, KeyBinding } from '@codemirror/view' | ||||
|  | ||||
| import { CompletionItemKind } from 'vscode-languageserver-protocol' | ||||
|  | ||||
| export const CompletionItemKindMap = Object.fromEntries( | ||||
|   Object.entries(CompletionItemKind).map(([key, value]) => [value, key]) | ||||
| ) as Record<CompletionItemKind, string> | ||||
|  | ||||
| const lspAutocompleteKeymap: readonly KeyBinding[] = [ | ||||
|   { key: 'Ctrl-Space', run: startCompletion }, | ||||
|   { | ||||
|     key: 'Escape', | ||||
|     run: (view: EditorView): boolean => { | ||||
|       if (clearSnippet(view)) return true | ||||
|  | ||||
|       return closeCompletion(view) | ||||
|     }, | ||||
|   }, | ||||
|   { key: 'ArrowDown', run: moveCompletionSelection(true) }, | ||||
|   { key: 'ArrowUp', run: moveCompletionSelection(false) }, | ||||
|   { key: 'PageDown', run: moveCompletionSelection(true, 'page') }, | ||||
|   { key: 'PageUp', run: moveCompletionSelection(false, 'page') }, | ||||
|   { key: 'Enter', run: acceptCompletion }, | ||||
|   { | ||||
|     key: 'Tab', | ||||
|     run: (view: EditorView): boolean => { | ||||
|       if (hasNextSnippetField(view.state)) { | ||||
|         const result = nextSnippetField(view) | ||||
|         return result | ||||
|       } | ||||
|  | ||||
|       return acceptCompletion(view) | ||||
|     }, | ||||
|     shift: prevSnippetField, | ||||
|   }, | ||||
| ] | ||||
|  | ||||
| export const lspAutocompleteKeymapExt = Prec.highest( | ||||
|   keymap.computeN([], () => [lspAutocompleteKeymap]) | ||||
| ) | ||||
							
								
								
									
										27
									
								
								packages/codemirror-lsp-client/src/plugin/format.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,27 @@ | ||||
| import { Extension, Prec } from '@codemirror/state' | ||||
| import { EditorView, keymap, KeyBinding, ViewPlugin } from '@codemirror/view' | ||||
|  | ||||
| import { LanguageServerPlugin } from './lsp' | ||||
|  | ||||
| export default function lspFormatExt( | ||||
|   plugin: ViewPlugin<LanguageServerPlugin> | ||||
| ): Extension { | ||||
|   const formatKeymap: readonly KeyBinding[] = [ | ||||
|     { | ||||
|       key: 'Alt-Shift-f', | ||||
|       run: (view: EditorView) => { | ||||
|         let value = view.plugin(plugin) | ||||
|         if (!value) return false | ||||
|         value.requestFormatting() | ||||
|         return true | ||||
|       }, | ||||
|     }, | ||||
|   ] | ||||
|  | ||||
|   // Create an extension for the key mappings. | ||||
|   const formatKeymapExt = Prec.highest( | ||||
|     keymap.computeN([], () => [formatKeymap]) | ||||
|   ) | ||||
|  | ||||
|   return formatKeymapExt | ||||
| } | ||||
							
								
								
									
										22
									
								
								packages/codemirror-lsp-client/src/plugin/hover.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,22 @@ | ||||
| import { Extension } from '@codemirror/state' | ||||
| import { hoverTooltip, tooltips, ViewPlugin } from '@codemirror/view' | ||||
|  | ||||
| import { LanguageServerPlugin } from './lsp' | ||||
| import { offsetToPos } from './util' | ||||
|  | ||||
| export default function lspHoverExt( | ||||
|   plugin: ViewPlugin<LanguageServerPlugin> | ||||
| ): Extension { | ||||
|   return [ | ||||
|     hoverTooltip((view, pos) => { | ||||
|       const value = view.plugin(plugin) | ||||
|       return ( | ||||
|         value?.requestHoverTooltip(view, offsetToPos(view.state.doc, pos)) ?? | ||||
|         null | ||||
|       ) | ||||
|     }), | ||||
|     tooltips({ | ||||
|       position: 'absolute', | ||||
|     }), | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										21
									
								
								packages/codemirror-lsp-client/src/plugin/indent.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,21 @@ | ||||
| import { indentService } from '@codemirror/language' | ||||
| import { Extension } from '@codemirror/state' | ||||
|  | ||||
| export default function lspIndentExt(): Extension { | ||||
|   // Match the indentation of the previous line (if present). | ||||
|   return indentService.of((context, pos) => { | ||||
|     try { | ||||
|       const previousLine = context.lineAt(pos, -1) | ||||
|       const previousLineText = previousLine.text.replaceAll( | ||||
|         '\t', | ||||
|         ' '.repeat(context.state.tabSize) | ||||
|       ) | ||||
|       const match = previousLineText.match(/^(\s)*/) | ||||
|       if (match === null || match.length <= 0) return null | ||||
|       return match[0].length | ||||
|     } catch (err) { | ||||
|       console.error('Error in codemirror indentService', err) | ||||
|     } | ||||
|     return null | ||||
|   }) | ||||
| } | ||||