Compare commits
	
		
			5 Commits
		
	
	
		
			v0.23.0
			...
			kurt-test-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 34f5bccd6a | |||
| bf4c666403 | |||
| b769aeffe8 | |||
| c158ffcb79 | |||
| b5e4b7cf2b | 
| @ -1,3 +1,3 @@ | ||||
| [codespell] | ||||
| ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast,ue | ||||
| ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast | ||||
| skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,./src-tauri/gen/schemas | ||||
|  | ||||
							
								
								
									
										10
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						| @ -4,8 +4,7 @@ | ||||
|       "project": "./tsconfig.json" | ||||
|     }, | ||||
|     "plugins": [ | ||||
|       "css-modules", | ||||
|       "suggest-no-throw", | ||||
|       "css-modules" | ||||
|     ], | ||||
|     "extends": [ | ||||
|       "react-app", | ||||
| @ -18,7 +17,6 @@ | ||||
|         "never" | ||||
|       ], | ||||
|       "react-hooks/exhaustive-deps": "off", | ||||
|       "suggest-no-throw/suggest-no-throw": "warn", | ||||
|     }, | ||||
|     "overrides": [ | ||||
|       { | ||||
| @ -27,12 +25,6 @@ | ||||
|           "@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,7 +38,5 @@ jobs: | ||||
|       - name: Benchmark kcl library | ||||
|         shell: bash | ||||
|         run: |- | ||||
|           cd src/wasm-lib/kcl; cargo bench --all-features -- iai | ||||
|         env: | ||||
|           KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} | ||||
|           cd src/wasm-lib/kcl; cargo bench -- iai | ||||
|  | ||||
|  | ||||
							
								
								
									
										40
									
								
								.github/workflows/cargo-check.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,40 +0,0 @@ | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - '**.rs' | ||||
|       - .github/workflows/cargo-check.yml | ||||
|   pull_request: | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| name: cargo check | ||||
| jobs: | ||||
|   cargocheck: | ||||
|     name: cargo check | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         dir: ['src/wasm-lib'] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Install latest rust | ||||
|         uses: actions-rs/toolchain@v1 | ||||
|         with: | ||||
|             toolchain: stable | ||||
|             override: true | ||||
|  | ||||
|       - name: Rust Cache | ||||
|         uses: Swatinem/rust-cache@v2.6.1 | ||||
|  | ||||
|       - name: Run check | ||||
|         run: | | ||||
|           cd "${{ matrix.dir }}" | ||||
|           # We specifically want to test the disable-println feature | ||||
|           # Since it is not enabled by default, we need to specify it | ||||
|           # This is used in kcl-lsp | ||||
|           cargo check --all --features disable-println --features pyo3 | ||||
							
								
								
									
										11
									
								
								.github/workflows/cargo-clippy.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -9,12 +9,6 @@ on: | ||||
|       - '**.rs' | ||||
|       - .github/workflows/cargo-clippy.yml | ||||
|   pull_request: | ||||
|     paths: | ||||
|       - '**/Cargo.toml' | ||||
|       - '**/Cargo.lock' | ||||
|       - '**/rust-toolchain.toml' | ||||
|       - '**.rs' | ||||
|       - .github/workflows/cargo-clippy.yml | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| @ -60,8 +54,3 @@ jobs: | ||||
|         run: | | ||||
|           cd "${{ matrix.dir }}" | ||||
|           cargo clippy --all --tests --benches -- -D warnings | ||||
|       # If this fails, run "cargo check" to update Cargo.lock, | ||||
|       # then add Cargo.lock to the PR. | ||||
|       - name: Check Cargo.lock doesn't need updating | ||||
|         run: | | ||||
|           cargo check --locked || echo "Pls run cargo check and commit the changed Cargo.lock" | ||||
|  | ||||
							
								
								
									
										14
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -180,7 +180,9 @@ jobs: | ||||
|       - name: Setup Rust | ||||
|         uses: dtolnay/rust-toolchain@stable | ||||
|  | ||||
|       # TODO: re-enable for Windows builds, see https://github.com/tauri-apps/tauri/issues/9045 | ||||
|       - name: Setup Rust cache | ||||
|         if: matrix.os != 'windows-latest' | ||||
|         uses: swatinem/rust-cache@v2 | ||||
|         with: | ||||
|           workspaces: './src-tauri -> target' | ||||
| @ -238,8 +240,12 @@ jobs: | ||||
|         shell: cmd | ||||
|  | ||||
|       - name: Build the app (debug) | ||||
|         uses: tauri-apps/tauri-action@v0 | ||||
|         if: ${{ env.BUILD_RELEASE == 'false' }} | ||||
|         run: "yarn tauri build --debug ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|         with: | ||||
|           includeRelease: false | ||||
|           includeDebug: true | ||||
|           args: "${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|  | ||||
|       - name: Build for Mac TestFlight (nightly) | ||||
|         if: ${{ github.event_name == 'schedule' && matrix.os == 'macos-14' }} | ||||
| @ -332,6 +338,7 @@ 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 }} | ||||
| @ -343,7 +350,8 @@ 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' }}" | ||||
|         run: "yarn tauri build ${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|         with: | ||||
|           args: "${{ env.TAURI_CONF_ARGS }} ${{ env.TAURI_ARGS_MACOS }} ${{ env.TAURI_ARGS_UBUNTU }}" | ||||
|  | ||||
|       - uses: actions/upload-artifact@v3 | ||||
|         if: matrix.os != 'ubuntu-latest' | ||||
| @ -377,8 +385,6 @@ 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] | ||||
|  | ||||
							
								
								
									
										122
									
								
								.github/workflows/playwright.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -38,8 +38,6 @@ 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: | ||||
| @ -48,18 +46,12 @@ jobs: | ||||
|     - uses: KittyCAD/action-install-cli@main | ||||
|     - name: Install dependencies | ||||
|       run: yarn | ||||
|     - name: Cache Playwright Browsers | ||||
|       uses: actions/cache@v4 | ||||
|       with: | ||||
|         path: | | ||||
|           ~/.cache/ms-playwright/ | ||||
|         key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }} | ||||
|     - name: Install Playwright Browsers | ||||
|       run: yarn playwright install --with-deps | ||||
|     - name: Download Wasm Cache | ||||
|       id: download-wasm | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       uses: dawidd6/action-download-artifact@v6 | ||||
|       uses: dawidd6/action-download-artifact@v3 | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         github_token: ${{secrets.GITHUB_TOKEN}} | ||||
| @ -92,24 +84,26 @@ jobs: | ||||
|     - name: build web | ||||
|       run: yarn build:local | ||||
|     - name: Run ubuntu/chrome snapshots | ||||
|       continue-on-error: true | ||||
|       run: | | ||||
|         yarn playwright test --project="Google Chrome" --update-snapshots e2e/playwright/snapshot-tests.spec.ts | ||||
|       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 }} | ||||
|     - name: Clean up test-results | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       continue-on-error: true | ||||
|       run: rm -r test-results | ||||
|       with: | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|     - name: check for changes | ||||
|       id: git-check | ||||
|       run: | | ||||
|           git add . | ||||
|           if git status | grep -q "Changes to be committed" | ||||
|           then echo "modified=true" >> $GITHUB_OUTPUT | ||||
|           else echo "modified=false" >> $GITHUB_OUTPUT | ||||
|           then | ||||
|             echo "::set-output name=modified::true" | ||||
|           else | ||||
|             echo "::set-output name=modified::false" | ||||
|           fi | ||||
|     - name: Commit changes, if any | ||||
|       if: steps.git-check.outputs.modified == 'true' | ||||
| @ -125,63 +119,23 @@ 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@v4 | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       with: | ||||
|         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 }} | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|   playwright-macos: | ||||
|     timeout-minutes: 60 | ||||
|     runs-on: macos-14-large | ||||
|     runs-on: macos-14 | ||||
|     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: | ||||
| @ -189,20 +143,12 @@ jobs: | ||||
|         cache: 'yarn' | ||||
|     - name: Install dependencies | ||||
|       run: yarn | ||||
|     - name: Cache Playwright Browsers | ||||
|       uses: actions/cache@v4 | ||||
|       with: | ||||
|         path: | | ||||
|           ~/.cache/ms-playwright | ||||
|         key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} | ||||
|         restore-keys: | | ||||
|           ${{ runner.os }}-playwright- | ||||
|     - name: Install Playwright Browsers | ||||
|       run: yarn playwright install --with-deps | ||||
|     - name: Download Wasm Cache | ||||
|       id: download-wasm | ||||
|       if: needs.check-rust-changes.outputs.rust-changed == 'false' | ||||
|       uses: dawidd6/action-download-artifact@v6 | ||||
|       uses: dawidd6/action-download-artifact@v3 | ||||
|       continue-on-error: true | ||||
|       with: | ||||
|         github_token: ${{secrets.GITHUB_TOKEN}} | ||||
| @ -234,48 +180,16 @@ 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@v4 | ||||
|       if: ${{ always() }} | ||||
|     - uses: actions/upload-artifact@v3 | ||||
|       if: always() | ||||
|       with: | ||||
|         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 }} | ||||
|         name: playwright-report | ||||
|         path: playwright-report/ | ||||
|         retention-days: 30 | ||||
|         overwrite: true | ||||
|  | ||||
|  | ||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -17,7 +17,6 @@ | ||||
| .env.development.local | ||||
| .env.test.local | ||||
| .env.production.local | ||||
| .direnv | ||||
|  | ||||
| npm-debug.log* | ||||
| yarn-debug.log* | ||||
| @ -56,5 +55,3 @@ src-tauri/gen | ||||
|  | ||||
| src/wasm-lib/grackle/stdlib_cube_partial.json | ||||
| Mac_App_Distribution.provisionprofile | ||||
|  | ||||
| *.tsbuildinfo | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| # Ignore artifacts: | ||||
| build | ||||
| dist | ||||
| coverage | ||||
|  | ||||
| # Ignore Rust projects: | ||||
| @ -10,6 +9,5 @@ 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
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,7 @@ | ||||
| { | ||||
|     "cSpell.words": [ | ||||
|         "geos" | ||||
|     ], | ||||
|     "editor.tabSize": 2, | ||||
|     "editor.insertSpaces": true, | ||||
| } | ||||
							
								
								
									
										17
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						| @ -1,17 +0,0 @@ | ||||
| .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 $(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 yarn.lock | ||||
| 	yarn install | ||||
							
								
								
									
										92
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @ -89,6 +89,25 @@ 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 | ||||
| @ -176,36 +195,30 @@ $ 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). | ||||
|  | ||||
| ## Tests | ||||
| ### Playwright | ||||
|  | ||||
| ### Playwright tests | ||||
|  | ||||
| For a portable way to run Playwright you'll need Docker. | ||||
|  | ||||
| After that, open a terminal and run: | ||||
| First time running plawright locally, you'll need to add the secrets file | ||||
|  | ||||
| ```bash | ||||
| docker run --network host  --rm --init -it playwright/chrome:playwright-1.43.1 | ||||
| touch ./e2e/playwright/playwright-secrets.env | ||||
| printf 'token="your-token"\nsnapshottoken="your-snapshot-token"' > ./e2e/playwright/playwright-secrets.env | ||||
| ``` | ||||
|  | ||||
| and in another terminal, run: | ||||
|  | ||||
| ```bash | ||||
| PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite> | ||||
| ``` | ||||
|  | ||||
| An example of a `<test suite>` is: `e2e/playwright/flow-tests.spec.ts` | ||||
|  | ||||
| YOU WILL NEED A PLAYWRIGHT-SECRETS.ENV FILE: | ||||
|  | ||||
|  | ||||
| ```bash | ||||
| # ./e2e/playwright/playwright-secrets.env | ||||
| token=<your-token> | ||||
| snapshottoken=<your-snapshot-token> | ||||
| ``` | ||||
| then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens | ||||
|  | ||||
| then: | ||||
| run playwright | ||||
|  | ||||
| ``` | ||||
| yarn playwright test | ||||
| ``` | ||||
|  | ||||
| run a specific test suite | ||||
|  | ||||
| ``` | ||||
| yarn playwright test src/e2e-tests/example.spec.ts | ||||
| ``` | ||||
|  | ||||
| run a specific test change the test from `test('...` to `test.only('...` | ||||
| (note if you commit this, the tests will instantly fail without running any of the tests) | ||||
|  | ||||
| @ -267,37 +280,6 @@ 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. | ||||
| @ -333,7 +315,7 @@ PS: for the debug panel, the following JSON is useful for snapping the camera | ||||
|  | ||||
| ``` | ||||
| yarn install | ||||
| yarn build:wasm-dev | ||||
| yarn build:wasm | ||||
| cp src/wasm-lib/pkg/wasm_lib_bg.wasm public | ||||
| yarn vite build --mode development | ||||
| yarn tauri build --debug -b | ||||
|  | ||||
| @ -17,13 +17,4 @@ once fixed in engine will just start working here with no language changes. | ||||
|     currently move or transform the imported objects at all, once we have assemblies | ||||
|     this will work. | ||||
|  | ||||
| - **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet | ||||
|     cases work currently. | ||||
|  | ||||
| - **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. | ||||
| - **Fillets**: Fillets cannot intersect, you will get an error. Only simple fillet cases work currently. | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle to match the given length for x. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angleToMatchLengthX(segment_name: TagIdentifier, to: number, sketch_group: SketchGroup) -> number | ||||
| angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,8 +17,11 @@ angleToMatchLengthX(segment_name: TagIdentifier, to: number, sketch_group: Sketc | ||||
| ```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) | ||||
| @ -28,16 +31,13 @@ const extrusion = extrude(5, sketch001) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `to`: `number` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -73,181 +73,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -270,16 +101,16 @@ const extrusion = extrude(5, sketch001) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -287,12 +118,8 @@ const extrusion = extrude(5, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -304,12 +131,8 @@ const extrusion = extrude(5, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -317,12 +140,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -330,12 +149,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -345,12 +160,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -362,16 +173,30 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle to match the given length for y. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angleToMatchLengthY(segment_name: TagIdentifier, to: number, sketch_group: SketchGroup) -> number | ||||
| angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,9 +17,9 @@ angleToMatchLengthY(segment_name: TagIdentifier, to: number, sketch_group: Sketc | ||||
| ```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,16 +32,13 @@ const extrusion = extrude(5, sketch001) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `to`: `number` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -77,181 +74,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -274,16 +102,16 @@ const extrusion = extrude(5, sketch001) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -291,12 +119,8 @@ const extrusion = extrude(5, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -308,12 +132,8 @@ const extrusion = extrude(5, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -321,12 +141,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -334,12 +150,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -349,12 +161,8 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -366,16 +174,30 @@ const extrusion = extrude(5, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLine(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLine(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -43,6 +43,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -78,181 +80,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -275,16 +108,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -292,12 +125,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -309,12 +138,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -322,12 +147,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -335,12 +156,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -350,12 +167,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -367,32 +180,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -428,181 +250,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -625,16 +278,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -642,12 +295,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -659,12 +308,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -672,12 +317,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -685,12 +326,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -700,12 +337,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -717,16 +350,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line of a given x length. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,10 +17,10 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDe | ||||
| ```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) | ||||
| ``` | ||||
| @ -42,6 +42,8 @@ const extrusion = extrude(10, sketch001) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -77,181 +79,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -274,16 +107,16 @@ const extrusion = extrude(10, sketch001) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -291,12 +124,8 @@ const extrusion = extrude(10, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -308,12 +137,8 @@ const extrusion = extrude(10, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -321,12 +146,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -334,12 +155,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -349,12 +166,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -366,32 +179,41 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -427,181 +249,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -624,16 +277,16 @@ const extrusion = extrude(10, sketch001) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -641,12 +294,8 @@ const extrusion = extrude(10, sketch001) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -658,12 +307,8 @@ const extrusion = extrude(10, sketch001) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -671,12 +316,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -684,12 +325,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -699,12 +336,8 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -716,16 +349,30 @@ const extrusion = extrude(10, sketch001) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line of a given y length. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -44,6 +44,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -79,181 +81,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -276,16 +109,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -293,12 +126,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -310,12 +139,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -323,12 +148,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -336,12 +157,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -351,12 +168,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -368,32 +181,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -429,181 +251,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -626,16 +279,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -643,12 +296,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -660,12 +309,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -673,12 +318,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -686,12 +327,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -701,12 +338,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -718,16 +351,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line that intersects with a given line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup, tag?: String) -> 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,9 +40,7 @@ const example = extrude(10, exampleSketch) | ||||
| 	// The angle of the line. | ||||
| 	angle: number, | ||||
| 	// The tag of the line to intersect with. | ||||
| 	intersectTag: { | ||||
| 	value: string, | ||||
| }, | ||||
| 	intersectTag: string, | ||||
| 	// The offset from the intersecting line. | ||||
| 	offset: number, | ||||
| } | ||||
| @ -50,6 +48,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -85,181 +85,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -282,16 +113,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -299,12 +130,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -316,12 +143,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -329,12 +152,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -342,12 +161,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -357,12 +172,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -374,32 +185,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -435,181 +255,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -632,16 +283,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -649,12 +300,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -666,12 +313,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -679,12 +322,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -692,12 +331,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -707,12 +342,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -724,16 +355,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line to a given x coordinate. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLineToX(data: AngledLineToData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -41,6 +41,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -76,181 +78,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -273,16 +106,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -290,12 +123,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -307,12 +136,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -320,12 +145,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -333,12 +154,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -348,12 +165,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -365,32 +178,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -426,181 +248,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -623,16 +276,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -640,12 +293,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -657,12 +306,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -670,12 +315,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -683,12 +324,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -698,12 +335,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -715,16 +348,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an angled line to a given y coordinate. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| angledLineToY(data: AngledLineToData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -41,6 +41,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -76,181 +78,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -273,16 +106,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -290,12 +123,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -307,12 +136,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -320,12 +145,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -333,12 +154,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -348,12 +165,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -365,32 +178,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -426,181 +248,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -623,16 +276,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -640,12 +293,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -657,12 +306,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -670,12 +315,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -683,12 +324,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -698,12 +335,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -715,16 +348,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
							
								
								
									
										521
									
								
								docs/kcl/arc.md
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| arc(data: ArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| arc(data: ArcData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -52,6 +52,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -87,181 +89,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -284,16 +117,16 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -301,12 +134,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -318,12 +147,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -331,12 +156,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -344,12 +165,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -359,12 +176,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -376,32 +189,41 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -437,181 +259,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -634,16 +287,16 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -651,12 +304,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -668,12 +317,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -681,12 +326,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -694,12 +335,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -709,12 +346,8 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -726,16 +359,30 @@ const exampleSketch = startSketchOn('XZ') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a bezier curve. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| bezierCurve(data: BezierData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -47,6 +47,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -82,181 +84,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -279,16 +112,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -296,12 +129,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -313,12 +142,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -326,12 +151,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -339,12 +160,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -354,12 +171,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -371,32 +184,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -432,181 +254,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -629,16 +282,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -646,12 +299,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -663,12 +312,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -676,12 +321,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -689,12 +330,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -704,12 +341,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -721,16 +354,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Sketch a circle. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| circle(center: [number], radius: number, sketch_surface_or_group: SketchSurfaceOrGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| circle(center: [number], radius: number, tag?: String, sketch_surface_or_group: SketchSurfaceOrGroup) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -41,6 +41,7 @@ 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 | ||||
| { | ||||
| @ -75,181 +76,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -273,6 +105,8 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -308,74 +142,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -398,16 +170,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -415,12 +187,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -432,12 +200,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -445,12 +209,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -458,12 +218,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -473,12 +229,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -490,24 +242,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| @ -516,6 +274,8 @@ const example = extrude(5, exampleSketch) | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -551,181 +311,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -748,16 +339,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -765,12 +356,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -782,12 +369,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -795,12 +378,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -808,12 +387,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -823,12 +398,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -840,16 +411,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Close the current sketch. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| close(sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| close(sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -42,6 +42,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -77,181 +79,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -274,16 +107,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -291,12 +124,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -308,12 +137,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -321,12 +146,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -334,12 +155,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -349,12 +166,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -366,32 +179,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -427,181 +249,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -624,16 +277,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -641,12 +294,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -658,12 +307,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -671,12 +316,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -684,12 +325,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -699,12 +336,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -716,16 +349,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -67,6 +67,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -102,181 +104,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -299,16 +132,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -317,12 +150,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -334,12 +163,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -347,12 +172,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -360,12 +181,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -375,12 +192,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -392,16 +205,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	type: "sketchGroups", | ||||
| @ -415,182 +242,20 @@ 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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -602,12 +267,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -615,12 +276,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -628,12 +285,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -643,12 +296,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -660,17 +309,12 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	type: "extrudeGroup", | ||||
| @ -680,14 +324,14 @@ const example = extrude(10, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -695,16 +339,34 @@ const example = extrude(10, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	type: "extrudeGroups", | ||||
|  | ||||
| @ -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,9 +50,7 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	radius: number, | ||||
| 	// The tags of the paths you want to fillet. | ||||
| 	tags: [uuid | | ||||
| { | ||||
| 	value: string, | ||||
| }], | ||||
| string], | ||||
| } | ||||
| ``` | ||||
| * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) | ||||
| @ -60,182 +58,20 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// 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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -247,12 +83,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -260,12 +92,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -273,12 +101,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -288,12 +112,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -305,17 +125,12 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -324,14 +139,14 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -339,16 +154,34 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| @ -359,182 +192,20 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// 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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -546,12 +217,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -559,12 +226,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -572,12 +235,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -587,12 +246,8 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -604,17 +259,12 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -623,14 +273,14 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -638,16 +288,34 @@ const mountingPlate = extrude(thickness, mountingPlateSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get an edge on a 3D solid. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,7 +17,7 @@ getEdge(tag: TagIdentifier, 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,193 +39,26 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -237,12 +70,8 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -250,12 +79,8 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -263,12 +88,8 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -278,12 +99,8 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -295,17 +112,12 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -314,14 +126,14 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -329,16 +141,34 @@ const revolution = startSketchOn(box, "revolveAxis") | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the next adjacent edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getNextAdjacentEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getNextAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -21,13 +21,15 @@ 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", %) | ||||
|        ] | ||||
|      }, %) | ||||
| ``` | ||||
|  | ||||
| @ -35,193 +37,26 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -233,12 +68,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -246,12 +77,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -259,12 +86,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -274,12 +97,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -291,17 +110,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -310,14 +124,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -325,16 +139,34 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the opposite edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getOppositeEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getOppositeEdge(tag: String, 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,193 +35,26 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -233,12 +66,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -246,12 +75,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -259,12 +84,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -274,12 +95,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -291,17 +108,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -310,14 +122,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -325,16 +137,34 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Get the previous adjacent edge to the edge given. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| getPreviousAdjacentEdge(tag: TagIdentifier, extrude_group: ExtrudeGroup) -> Uuid | ||||
| getPreviousAdjacentEdge(tag: String, 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,193 +37,26 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `tag`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -235,12 +68,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -248,12 +77,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -261,12 +86,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -276,12 +97,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -293,17 +110,12 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -312,14 +124,14 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -327,16 +139,34 @@ const example = extrude(5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -48,182 +48,20 @@ 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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -235,12 +73,8 @@ const part001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -248,12 +82,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -261,12 +91,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -276,12 +102,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -293,17 +115,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -312,14 +129,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -327,16 +144,34 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| @ -347,182 +182,20 @@ 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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -534,12 +207,8 @@ const part001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -547,12 +216,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -560,12 +225,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -575,12 +236,8 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -592,17 +249,12 @@ const part001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -611,14 +263,14 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -626,16 +278,34 @@ const part001 = startSketchOn('XY') | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
							
								
								
									
										765
									
								
								docs/kcl/hole.md
									
									
									
									
									
								
							
							
						
						| @ -53,6 +53,8 @@ const example = extrude(1, exampleSketch) | ||||
| * `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -88,181 +90,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -285,16 +118,16 @@ const example = extrude(1, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -303,12 +136,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -320,12 +149,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -333,12 +158,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -346,12 +167,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -361,12 +178,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -378,16 +191,30 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	type: "sketchGroups", | ||||
| @ -396,6 +223,8 @@ const example = extrude(1, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -431,181 +260,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -628,16 +288,16 @@ const example = extrude(1, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -645,12 +305,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -662,12 +318,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -675,12 +327,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -688,12 +336,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -703,12 +347,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -720,16 +360,30 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
| @ -738,6 +392,8 @@ const example = extrude(1, exampleSketch) | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -773,181 +429,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -970,16 +457,16 @@ const example = extrude(1, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -987,12 +474,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -1004,12 +487,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -1017,12 +496,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -1030,12 +505,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -1045,12 +516,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -1062,16 +529,30 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -23,7 +23,6 @@ layout: manual | ||||
| * [`atan`](kcl/atan) | ||||
| * [`bezierCurve`](kcl/bezierCurve) | ||||
| * [`ceil`](kcl/ceil) | ||||
| * [`chamfer`](kcl/chamfer) | ||||
| * [`circle`](kcl/circle) | ||||
| * [`close`](kcl/close) | ||||
| * [`cos`](kcl/cos) | ||||
| @ -55,7 +54,6 @@ layout: manual | ||||
| * [`patternCircular3d`](kcl/patternCircular3d) | ||||
| * [`patternLinear2d`](kcl/patternLinear2d) | ||||
| * [`patternLinear3d`](kcl/patternLinear3d) | ||||
| * [`patternTransform`](kcl/patternTransform) | ||||
| * [`pi`](kcl/pi) | ||||
| * [`pow`](kcl/pow) | ||||
| * [`profileStart`](kcl/profileStart) | ||||
| @ -66,7 +64,6 @@ layout: manual | ||||
| * [`segEndX`](kcl/segEndX) | ||||
| * [`segEndY`](kcl/segEndY) | ||||
| * [`segLen`](kcl/segLen) | ||||
| * [`shell`](kcl/shell) | ||||
| * [`sin`](kcl/sin) | ||||
| * [`sqrt`](kcl/sqrt) | ||||
| * [`startProfileAt`](kcl/startProfileAt) | ||||
|  | ||||
| @ -33,6 +33,8 @@ const example = extrude(5, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -68,181 +70,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -265,16 +98,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -282,12 +115,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -299,12 +128,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -312,12 +137,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -325,12 +146,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -340,12 +157,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -357,16 +170,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -33,6 +33,8 @@ const example = extrude(5, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -68,181 +70,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -265,16 +98,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -282,12 +115,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -299,12 +128,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -312,12 +137,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -325,12 +146,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -340,12 +157,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -357,16 +170,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
							
								
								
									
										521
									
								
								docs/kcl/line.md
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw a line. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| line(delta: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| line(delta: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -46,6 +46,8 @@ const example = extrude(5, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -81,181 +83,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -278,16 +111,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -295,12 +128,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -312,12 +141,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -325,12 +150,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -338,12 +159,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -353,12 +170,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -370,32 +183,41 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -431,181 +253,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -628,16 +281,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -645,12 +298,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -662,12 +311,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -675,12 +320,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -688,12 +329,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -703,12 +340,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -720,16 +353,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| lineTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| lineTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -33,6 +33,8 @@ const example = extrude(5, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -68,181 +70,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -265,16 +98,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -282,12 +115,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -299,12 +128,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -312,12 +137,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -325,12 +146,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -340,12 +157,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -357,32 +170,41 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -418,181 +240,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -615,16 +268,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -632,12 +285,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -649,12 +298,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -662,12 +307,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -675,12 +316,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -690,12 +327,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -707,16 +340,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ A circular pattern on a 2D sketch. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| patternCircular2d(data: CircularPattern2dData, sketch_group_set: SketchGroupSet) -> [SketchGroup] | ||||
| patternCircular2d(data: CircularPattern2dData, sketch_group: SketchGroup) -> [SketchGroup] | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -48,9 +48,11 @@ const example = extrude(1, exampleSketch) | ||||
| 	rotateDuplicates: string, | ||||
| } | ||||
| ``` | ||||
| * `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -86,181 +88,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -283,30 +116,25 @@ const example = extrude(1, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| 	type: "sketchGroup", | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -318,12 +146,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -331,12 +155,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -344,12 +164,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -359,12 +175,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -376,19 +188,30 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| } | | ||||
| { | ||||
| 	type: "sketchGroups", | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ A circular pattern on a 3D model. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| patternCircular3d(data: CircularPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup] | ||||
| patternCircular3d(data: CircularPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -47,187 +47,25 @@ const example = extrude(-5, exampleSketch) | ||||
| 	rotateDuplicates: string, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group_set`: `ExtrudeGroupSet` - A extrude group or a group of extrude groups. (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -239,12 +77,8 @@ const example = extrude(-5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -252,12 +86,8 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -265,12 +95,8 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -280,12 +106,8 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -297,34 +119,28 @@ const example = extrude(-5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	type: "extrudeGroup", | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -332,19 +148,34 @@ const example = extrude(-5, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | | ||||
| { | ||||
| 	type: "extrudeGroups", | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -44,6 +44,8 @@ const example = extrude(1, exampleSketch) | ||||
| * `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -79,181 +81,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -276,16 +109,16 @@ const example = extrude(1, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -294,12 +127,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -311,12 +140,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -324,12 +149,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -337,12 +158,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -352,12 +169,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -369,16 +182,30 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	type: "sketchGroups", | ||||
|  | ||||
| @ -9,7 +9,7 @@ A linear pattern on a 3D model. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| patternLinear3d(data: LinearPattern3dData, extrude_group_set: ExtrudeGroupSet) -> [ExtrudeGroup] | ||||
| patternLinear3d(data: LinearPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -45,187 +45,25 @@ const example = extrude(1, exampleSketch) | ||||
| 	repetitions: number, | ||||
| } | ||||
| ``` | ||||
| * `extrude_group_set`: `ExtrudeGroupSet` - A extrude group or a group of extrude groups. (REQUIRED) | ||||
| * `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. | ||||
| 	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: { | ||||
| 	// 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, | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -237,12 +75,8 @@ const example = extrude(1, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -250,12 +84,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -263,12 +93,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -278,12 +104,8 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -295,34 +117,28 @@ const example = extrude(1, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	type: "extrudeGroup", | ||||
| 	// The extrude surfaces. | ||||
| 	value: [{ | ||||
| 	// The face id for the extrude plane. | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -330,19 +146,34 @@ const example = extrude(1, exampleSketch) | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| } | | ||||
| { | ||||
| 	type: "extrudeGroups", | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -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(%), %) | ||||
| @ -34,6 +34,8 @@ const sketch001 = startSketchOn('XY') | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -69,181 +71,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -266,16 +99,16 @@ const sketch001 = startSketchOn('XY') | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -283,12 +116,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -300,12 +129,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -313,12 +138,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -326,12 +147,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -341,12 +158,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -358,16 +171,30 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -29,6 +29,8 @@ const sketch001 = startSketchOn('XY') | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -64,181 +66,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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,16 +94,16 @@ const sketch001 = startSketchOn('XY') | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -278,12 +111,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -295,12 +124,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -308,12 +133,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -321,12 +142,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -336,12 +153,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -353,16 +166,30 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -28,6 +28,8 @@ const sketch001 = startSketchOn('XY') | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -63,181 +65,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -260,16 +93,16 @@ const sketch001 = startSketchOn('XY') | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -277,12 +110,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -294,12 +123,8 @@ const sketch001 = startSketchOn('XY') | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -307,12 +132,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -320,12 +141,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -335,12 +152,8 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -352,16 +165,30 @@ const sketch001 = startSketchOn('XY') | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the angle of the segment. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segAng(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| segAng(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -18,11 +18,11 @@ segAng(segment_name: TagIdentifier, 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,15 +32,12 @@ const example = extrude(4, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -76,181 +73,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -273,16 +101,16 @@ const example = extrude(4, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -290,12 +118,8 @@ const example = extrude(4, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -307,12 +131,8 @@ const example = extrude(4, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -320,12 +140,8 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -333,12 +149,8 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -348,12 +160,8 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -365,16 +173,30 @@ const example = extrude(4, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the segment end of x. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segEndX(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| segEndX(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,9 +17,9 @@ segEndX(segment_name: TagIdentifier, 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,15 +30,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -74,181 +71,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -271,16 +99,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -288,12 +116,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -305,12 +129,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -318,12 +138,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -331,12 +147,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -346,12 +158,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -363,16 +171,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the segment end of y. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segEndY(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| segEndY(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -18,9 +18,9 @@ segEndY(segment_name: TagIdentifier, 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,15 +31,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -75,181 +72,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -272,16 +100,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -289,12 +117,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -306,12 +130,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -319,12 +139,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -332,12 +148,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -347,12 +159,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -364,16 +172,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Returns the length of the segment. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| segLen(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number | ||||
| segLen(segment_name: string, sketch_group: SketchGroup) -> number | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -17,9 +17,12 @@ segLen(segment_name: TagIdentifier, 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) | ||||
| @ -29,15 +32,12 @@ const example = extrude(5, exampleSketch) | ||||
|  | ||||
| ### Arguments | ||||
|  | ||||
| * `segment_name`: `TagIdentifier` (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `segment_name`: `string` (REQUIRED) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -73,181 +73,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -270,16 +101,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -287,12 +118,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -304,12 +131,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -317,12 +140,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -330,12 +149,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -345,12 +160,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -362,16 +173,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Start a profile at a given point. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| startProfileAt(to: [number], sketch_surface: SketchSurface, tag?: TagDeclarator) -> SketchGroup | ||||
| startProfileAt(to: [number], sketch_surface: SketchSurface, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -90,238 +90,12 @@ 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 face id the sketch is on | ||||
| 	faceId: uuid, | ||||
| 	// 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, | ||||
| @ -345,20 +119,15 @@ const example = extrude(5, exampleSketch) | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -394,181 +163,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -591,16 +191,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -608,12 +208,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -625,12 +221,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -638,12 +230,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -651,12 +239,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -666,12 +250,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -683,16 +263,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -59,6 +59,8 @@ const example = extrude(5, exampleSketch) | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -94,181 +96,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -291,16 +124,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -308,12 +141,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -325,12 +154,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -338,12 +163,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -351,12 +172,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -366,12 +183,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -383,16 +196,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Start a sketch on a specific plane or face. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| startSketchOn(data: SketchData, tag?: FaceTag) -> SketchSurface | ||||
| startSketchOn(data: SketchData, tag?: SketchOnFaceTag) -> 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,118 +163,20 @@ 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. | ||||
| 	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 position of the extrude group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the extrude group. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The sketch group paths. | ||||
| 	sketchGroupValues: [{ | ||||
| 	// 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 name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -286,12 +188,8 @@ const a1 = startSketchOn({ | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -299,12 +197,8 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -312,12 +206,8 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -327,12 +217,8 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -344,17 +230,12 @@ const a1 = startSketchOn({ | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| }, | ||||
| 	// The id of the extrusion start cap | ||||
| 	startCapId: uuid, | ||||
| 	// The extrude surfaces. | ||||
| @ -363,14 +244,14 @@ const a1 = startSketchOn({ | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudePlane", | ||||
| } | | ||||
| { | ||||
| @ -378,24 +259,40 @@ const a1 = startSketchOn({ | ||||
| 	faceId: uuid, | ||||
| 	// The id of the geometry. | ||||
| 	id: uuid, | ||||
| 	// The name. | ||||
| 	name: string, | ||||
| 	// The position. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The source range. | ||||
| 	sourceRange: [number, number], | ||||
| 	// The tag. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	type: "extrudeArc", | ||||
| }], | ||||
| 	// The x-axis of the extrude group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the extrude group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the extrude group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `FaceTag` - A tag for a face. (OPTIONAL) | ||||
| * `tag`: `SketchOnFaceTag` - A tag for sketch on face. (OPTIONAL) | ||||
| ```js | ||||
| "start" | "end" | | ||||
| { | ||||
| 	value: string, | ||||
| } | ||||
| string | ||||
| ``` | ||||
|  | ||||
| ### Returns | ||||
| @ -434,238 +331,12 @@ const a1 = startSketchOn({ | ||||
| }, | ||||
| } | | ||||
| { | ||||
| 	// 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 face id the sketch is on | ||||
| 	faceId: uuid, | ||||
| 	// 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, | ||||
|  | ||||
							
								
								
									
										110379
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
							
						
						| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| tangentialArc(data: TangentialArcData, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -42,6 +42,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -77,181 +79,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -274,16 +107,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -291,12 +124,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -308,12 +137,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -321,12 +146,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -334,12 +155,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -349,12 +166,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -366,32 +179,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -427,181 +249,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -624,16 +277,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -641,12 +294,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -658,12 +307,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -671,12 +316,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -684,12 +325,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -699,12 +336,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -716,16 +349,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw an arc. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -33,6 +33,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -68,181 +70,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -265,16 +98,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -282,12 +115,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -299,12 +128,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -312,12 +137,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -325,12 +146,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -340,12 +157,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -357,32 +170,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -418,181 +240,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -615,16 +268,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -632,12 +285,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -649,12 +298,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -662,12 +307,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -675,12 +316,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -690,12 +327,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -707,16 +340,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line on the x-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| xLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| xLine(length: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -36,6 +36,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -71,181 +73,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -268,16 +101,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -285,12 +118,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -302,12 +131,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -315,12 +140,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -328,12 +149,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -343,12 +160,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -360,32 +173,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -421,181 +243,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -618,16 +271,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -635,12 +288,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -652,12 +301,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -665,12 +310,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -678,12 +319,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -693,12 +330,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -710,16 +343,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point on the x-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| xLineTo(to: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| xLineTo(to: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -36,6 +36,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -71,181 +73,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -268,16 +101,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -285,12 +118,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -302,12 +131,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -315,12 +140,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -328,12 +149,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -343,12 +160,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -360,32 +173,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -421,181 +243,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -618,16 +271,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -635,12 +288,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -652,12 +301,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -665,12 +310,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -678,12 +319,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -693,12 +330,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -710,16 +343,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line on the y-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| yLine(length: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| yLine(length: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -34,6 +34,8 @@ const example = extrude(10, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -69,181 +71,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -266,16 +99,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -283,12 +116,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -300,12 +129,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -313,12 +138,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -326,12 +147,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -341,12 +158,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -358,32 +171,41 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -419,181 +241,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -616,16 +269,16 @@ const example = extrude(10, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -633,12 +286,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -650,12 +299,8 @@ const example = extrude(10, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -663,12 +308,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -676,12 +317,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -691,12 +328,8 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -708,16 +341,30 @@ const example = extrude(10, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -9,7 +9,7 @@ Draw a line to a point on the y-axis. | ||||
|  | ||||
|  | ||||
| ```js | ||||
| yLineTo(to: number, sketch_group: SketchGroup, tag?: TagDeclarator) -> SketchGroup | ||||
| yLineTo(to: number, sketch_group: SketchGroup, tag?: String) -> SketchGroup | ||||
| ``` | ||||
|  | ||||
| ### Examples | ||||
| @ -32,6 +32,8 @@ const example = extrude(5, exampleSketch) | ||||
| * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -67,181 +69,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -264,16 +97,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -281,12 +114,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -298,12 +127,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -311,12 +136,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -324,12 +145,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -339,12 +156,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -356,32 +169,41 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `TagDeclarator` (OPTIONAL) | ||||
| ```js | ||||
| { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| } | ||||
| ``` | ||||
| * `tag`: `String` (OPTIONAL) | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| `SketchGroup` - A sketch group is a collection of paths. | ||||
| ```js | ||||
| { | ||||
| 	// The plane id or face id of the sketch group. | ||||
| 	entityId: uuid, | ||||
| 	// The id of the sketch group. | ||||
| 	id: uuid, | ||||
| 	// What the sketch is on (can be a plane or a face). | ||||
| @ -417,181 +239,12 @@ 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. | ||||
| 	// the face id the sketch is on | ||||
| 	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, | ||||
| @ -614,16 +267,16 @@ const example = extrude(5, exampleSketch) | ||||
| 	z: number, | ||||
| }, | ||||
| }, | ||||
| 	// The position of the sketch group. | ||||
| 	position: [number, number, number], | ||||
| 	// The rotation of the sketch group base plane. | ||||
| 	rotation: [number, number, number, number], | ||||
| 	// The starting path. | ||||
| 	start: { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| }, | ||||
| @ -631,12 +284,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	value: [{ | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "ToPoint", | ||||
| @ -648,12 +297,8 @@ const example = extrude(5, exampleSketch) | ||||
| 	center: [number, number], | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArcTo", | ||||
| @ -661,12 +306,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "TangentialArc", | ||||
| @ -674,12 +315,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Horizontal", | ||||
| @ -689,12 +326,8 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "AngledLineTo", | ||||
| @ -706,16 +339,30 @@ const example = extrude(5, exampleSketch) | ||||
| { | ||||
| 	// The from point. | ||||
| 	from: [number, number], | ||||
| 	// The tag of the path. | ||||
| 	tag: { | ||||
| 	end: number, | ||||
| 	start: number, | ||||
| 	value: string, | ||||
| }, | ||||
| 	// The name of the path. | ||||
| 	name: string, | ||||
| 	// The to point. | ||||
| 	to: [number, number], | ||||
| 	type: "Base", | ||||
| }], | ||||
| 	// The x-axis of the sketch group base plane in the 3D space | ||||
| 	xAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The y-axis of the sketch group base plane in the 3D space | ||||
| 	yAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| 	// The z-axis of the sketch group base plane in the 3D space | ||||
| 	zAxis: { | ||||
| 	x: number, | ||||
| 	y: number, | ||||
| 	z: number, | ||||
| }, | ||||
| } | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -91,9 +91,8 @@ 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') | ||||
| @ -331,7 +330,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 | ||||
| @ -387,64 +386,7 @@ 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 u.waitForAuthSkipAppStart() | ||||
|  | ||||
|   await u.openDebugPanel() | ||||
|  | ||||
|   await expect( | ||||
|     page.getByRole('button', { name: 'Start Sketch' }) | ||||
|   ).not.toBeDisabled() | ||||
|   await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible() | ||||
|  | ||||
|   // click on "Start Sketch" button | ||||
|   await u.clearCommandLogs() | ||||
|   await u.doAndWaitForImageDiff( | ||||
|     () => page.getByRole('button', { name: 'Start Sketch' }).click(), | ||||
|     200 | ||||
|   ) | ||||
|  | ||||
|   // select a plane | ||||
|   await page.mouse.click(700, 200) | ||||
|  | ||||
|   let code = `const sketch001 = startSketchOn('XZ')` | ||||
|   await expect(page.locator('.cm-content')).toHaveText(code) | ||||
|  | ||||
|   await page.waitForTimeout(700) // TODO detect animation ending, or disable animation | ||||
|  | ||||
|   const startXPx = 600 | ||||
|   await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) | ||||
|   code += ` | ||||
|   |> startProfileAt([7.19, -9.7], %)` | ||||
|   await expect(page.locator('.cm-content')).toHaveText(code) | ||||
|   await page.waitForTimeout(100) | ||||
|  | ||||
|   await u.closeDebugPanel() | ||||
|   await page.mouse.move(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|   await expect(page).toHaveScreenshot({ | ||||
|     maxDiffPixels: 100, | ||||
|   }) | ||||
|  | ||||
|   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|   await page.waitForTimeout(100) | ||||
|  | ||||
|   code += ` | ||||
|   |> line([7.25, 0], %)` | ||||
|   await expect(page.locator('.cm-content')).toHaveText(code) | ||||
|  | ||||
|   await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
|  | ||||
|   await page.mouse.move(startXPx + PUR * 30, 500 - PUR * 20, { steps: 10 }) | ||||
|  | ||||
|   await expect(page).toHaveScreenshot({ | ||||
|     maxDiffPixels: 100, | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| 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() | ||||
|  | ||||
| @ -464,7 +406,66 @@ test('Draft rectangles should look right', async ({ page, context }) => { | ||||
|   await page.mouse.click(700, 200) | ||||
|  | ||||
|   await expect(page.locator('.cm-content')).toHaveText( | ||||
|     `const sketch001 = startSketchOn('XZ')` | ||||
|     `const part001 = startSketchOn('XZ')` | ||||
|   ) | ||||
|  | ||||
|   await page.waitForTimeout(300) // TODO detect animation ending, or disable animation | ||||
|  | ||||
|   const startXPx = 600 | ||||
|   await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) | ||||
|   await expect(page.locator('.cm-content')) | ||||
|     .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|   |> startProfileAt([9.06, -12.22], %)`) | ||||
|   await page.waitForTimeout(100) | ||||
|  | ||||
|   await u.closeDebugPanel() | ||||
|   await page.mouse.move(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|   await expect(page).toHaveScreenshot({ | ||||
|     maxDiffPixels: 100, | ||||
|   }) | ||||
|  | ||||
|   await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|   await page.waitForTimeout(100) | ||||
|  | ||||
|   await expect(page.locator('.cm-content')) | ||||
|     .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|   |> startProfileAt([9.06, -12.22], %) | ||||
|   |> line([9.14, 0], %)`) | ||||
|  | ||||
|   await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
|  | ||||
|   await page.mouse.move(startXPx + PUR * 30, 500 - PUR * 20, { steps: 10 }) | ||||
|  | ||||
|   await expect(page).toHaveScreenshot({ | ||||
|     maxDiffPixels: 100, | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| 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() | ||||
|  | ||||
|   await expect( | ||||
|     page.getByRole('button', { name: 'Start Sketch' }) | ||||
|   ).not.toBeDisabled() | ||||
|   await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible() | ||||
|  | ||||
|   // click on "Start Sketch" button | ||||
|   await u.clearCommandLogs() | ||||
|   await u.doAndWaitForImageDiff( | ||||
|     () => page.getByRole('button', { name: 'Start Sketch' }).click(), | ||||
|     200 | ||||
|   ) | ||||
|  | ||||
|   // select a plane | ||||
|   await page.mouse.click(700, 200) | ||||
|  | ||||
|   await expect(page.locator('.cm-content')).toHaveText( | ||||
|     `const part001 = startSketchOn('XZ')` | ||||
|   ) | ||||
|  | ||||
|   await page.waitForTimeout(500) // TODO detect animation ending, or disable animation | ||||
| @ -491,7 +492,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() | ||||
|  | ||||
| @ -512,16 +513,17 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     // select a plane | ||||
|     await page.mouse.click(700, 200) | ||||
|  | ||||
|     let code = `const sketch001 = startSketchOn('XZ')` | ||||
|     await expect(page.locator('.cm-content')).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')).toHaveText( | ||||
|       `const part001 = startSketchOn('XZ')` | ||||
|     ) | ||||
|  | ||||
|     await page.waitForTimeout(600) // TODO detect animation ending, or disable animation | ||||
|     await page.waitForTimeout(300) // TODO detect animation ending, or disable animation | ||||
|  | ||||
|     const startXPx = 600 | ||||
|     await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) | ||||
|     code += ` | ||||
|   |> startProfileAt([7.19, -9.7], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|     |> startProfileAt([9.06, -12.22], %)`) | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     await u.closeDebugPanel() | ||||
| @ -529,18 +531,21 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     code += ` | ||||
|   |> line([7.25, 0], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|     |> startProfileAt([9.06, -12.22], %) | ||||
|     |> line([9.14, 0], %)`) | ||||
|  | ||||
|     await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     await page.mouse.click(startXPx + PUR * 30, 500 - PUR * 20) | ||||
|  | ||||
|     code += ` | ||||
|   |> tangentialArcTo([21.7, -2.44], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|     |> startProfileAt([9.06, -12.22], %) | ||||
|     |> line([9.14, 0], %) | ||||
|     |> tangentialArcTo([27.34, -3.08], %)`) | ||||
|  | ||||
|     // click tangential arc tool again to unequip it | ||||
|     await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
| @ -590,7 +595,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() | ||||
|  | ||||
| @ -611,16 +616,17 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     // select a plane | ||||
|     await page.mouse.click(700, 200) | ||||
|  | ||||
|     let code = `const sketch001 = startSketchOn('XZ')` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')).toHaveText( | ||||
|       `const part001 = startSketchOn('XZ')` | ||||
|     ) | ||||
|  | ||||
|     await page.waitForTimeout(600) // TODO detect animation ending, or disable animation | ||||
|     await page.waitForTimeout(300) // TODO detect animation ending, or disable animation | ||||
|  | ||||
|     const startXPx = 600 | ||||
|     await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) | ||||
|     code += ` | ||||
|   |> startProfileAt([182.59, -246.32], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|       |> startProfileAt([230.03, -310.32], %)`) | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     await u.closeDebugPanel() | ||||
| @ -628,18 +634,21 @@ test.describe('Client side scene scale should match engine scale', () => { | ||||
|     await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     code += ` | ||||
|   |> line([184.3, 0], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|       |> startProfileAt([230.03, -310.32], %) | ||||
|       |> line([232.2, 0], %)`) | ||||
|  | ||||
|     await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
|     await page.waitForTimeout(100) | ||||
|  | ||||
|     await page.mouse.click(startXPx + PUR * 30, 500 - PUR * 20) | ||||
|  | ||||
|     code += ` | ||||
|   |> tangentialArcTo([551.2, -62.01], %)` | ||||
|     await expect(u.codeLocator).toHaveText(code) | ||||
|     await expect(page.locator('.cm-content')) | ||||
|       .toHaveText(`const part001 = startSketchOn('XZ') | ||||
|       |> startProfileAt([230.03, -310.32], %) | ||||
|       |> line([232.2, 0], %) | ||||
|       |> tangentialArcTo([694.43, -78.12], %)`) | ||||
|  | ||||
|     await page.getByRole('button', { name: 'Tangential Arc' }).click() | ||||
|     await page.waitForTimeout(100) | ||||
| @ -690,7 +699,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() | ||||
| @ -740,7 +749,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() | ||||
| @ -777,7 +786,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() | ||||
| @ -796,83 +805,3 @@ 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: 41 KiB After Width: | Height: | Size: 41 KiB | 
| Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB | 
| Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 34 KiB | 
| Before Width: | Height: | Size: 12 KiB | 
| Before Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 65 KiB | 
| Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 71 KiB | 
| Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 75 KiB | 
| Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 43 KiB | 
| Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 45 KiB | 
| Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 43 KiB | 
| Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 44 KiB | 
| Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 42 KiB | 
| @ -1,6 +1,5 @@ | ||||
| import { SaveSettingsPayload } from 'lib/settings/settingsTypes' | ||||
| import { Themes } from 'lib/theme' | ||||
| import { onboardingPaths } from 'routes/Onboarding/paths' | ||||
|  | ||||
| export const TEST_SETTINGS_KEY = '/settings.toml' | ||||
| export const TEST_SETTINGS = { | ||||
| @ -23,22 +22,9 @@ export const TEST_SETTINGS = { | ||||
|   }, | ||||
| } satisfies Partial<SaveSettingsPayload> | ||||
|  | ||||
| export const TEST_SETTINGS_ONBOARDING_USER_MENU = { | ||||
|   ...TEST_SETTINGS, | ||||
|   app: { ...TEST_SETTINGS.app, onboardingStatus: onboardingPaths.USER_MENU }, | ||||
| } satisfies Partial<SaveSettingsPayload> | ||||
|  | ||||
| export const TEST_SETTINGS_ONBOARDING_EXPORT = { | ||||
|   ...TEST_SETTINGS, | ||||
|   app: { ...TEST_SETTINGS.app, onboardingStatus: onboardingPaths.EXPORT }, | ||||
| } satisfies Partial<SaveSettingsPayload> | ||||
|  | ||||
| export const TEST_SETTINGS_ONBOARDING_PARAMETRIC_MODELING = { | ||||
|   ...TEST_SETTINGS, | ||||
|   app: { | ||||
|     ...TEST_SETTINGS.app, | ||||
|     onboardingStatus: onboardingPaths.PARAMETRIC_MODELING, | ||||
|   }, | ||||
|   app: { ...TEST_SETTINGS.app, onboardingStatus: '/export' }, | ||||
| } satisfies Partial<SaveSettingsPayload> | ||||
|  | ||||
| export const TEST_SETTINGS_ONBOARDING_START = { | ||||
| @ -64,25 +50,3 @@ export const TEST_SETTINGS_CORRUPTED = { | ||||
|     textWrapping: true, | ||||
|   }, | ||||
| } satisfies Partial<SaveSettingsPayload> | ||||
|  | ||||
| export const TEST_CODE_GIZMO = `const part001 = startSketchOn('XZ') | ||||
| |> startProfileAt([20, 0], %) | ||||
| |> line([7.13, 4 + 0], %) | ||||
| |> angledLine({ angle: 3 + 0, length: 3.14 + 0 }, %) | ||||
| |> lineTo([20.14 + 0, -0.14 + 0], %) | ||||
| |> xLineTo(29 + 0, %) | ||||
| |> yLine(-3.14 + 0, %, 'a') | ||||
| |> xLine(1.63, %) | ||||
| |> angledLineOfXLength({ angle: 3 + 0, length: 3.14 }, %) | ||||
| |> angledLineOfYLength({ angle: 30, length: 3 + 0 }, %) | ||||
| |> angledLineToX({ angle: 22.14 + 0, to: 12 }, %) | ||||
| |> angledLineToY({ angle: 30, to: 11.14 }, %) | ||||
| |> angledLineThatIntersects({ | ||||
|   angle: 3.14, | ||||
|   intersectTag: 'a', | ||||
|   offset: 0 | ||||
| }, %) | ||||
| |> tangentialArcTo([13.14 + 0, 13.14], %) | ||||
| |> close(%) | ||||
| |> extrude(5 + 7, %) | ||||
| ` | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| import { test, expect, Page, Download } from '@playwright/test' | ||||
| import { EngineCommand } from '../../src/lang/std/engineConnection' | ||||
| import os from 'os' | ||||
| import fsp from 'fs/promises' | ||||
| import pixelMatch from 'pixelmatch' | ||||
| import { PNG } from 'pngjs' | ||||
| @ -8,27 +7,18 @@ import { Protocol } from 'playwright-core/types/protocol' | ||||
| import type { Models } from '@kittycad/lib' | ||||
| import { APP_NAME } from 'lib/constants' | ||||
|  | ||||
| type TestColor = [number, number, number] | ||||
| export const TEST_COLORS = { | ||||
|   WHITE: [249, 249, 249] as TestColor, | ||||
|   YELLOW: [255, 255, 0] as TestColor, | ||||
|   BLUE: [0, 0, 255] as TestColor, | ||||
| } as const | ||||
|  | ||||
| async function waitForPageLoad(page: Page) { | ||||
|   // wait for 'Loading stream...' spinner | ||||
|   await page.getByTestId('loading-stream').waitFor() | ||||
|   // wait for all spinners to be gone | ||||
|   await page | ||||
|     .getByTestId('loading') | ||||
|     .waitFor({ state: 'detached', timeout: 20_000 }) | ||||
|   await page.getByTestId('loading').waitFor({ state: 'detached' }) | ||||
|  | ||||
|   await page.getByTestId('start-sketch').waitFor() | ||||
| } | ||||
|  | ||||
| async function removeCurrentCode(page: Page) { | ||||
|   const hotkey = process.platform === 'darwin' ? 'Meta' : 'Control' | ||||
|   await page.locator('.cm-content').click() | ||||
|   await page.click('.cm-content') | ||||
|   await page.keyboard.down(hotkey) | ||||
|   await page.keyboard.press('a') | ||||
|   await page.keyboard.up(hotkey) | ||||
| @ -37,16 +27,16 @@ async function removeCurrentCode(page: Page) { | ||||
| } | ||||
|  | ||||
| async function sendCustomCmd(page: Page, cmd: EngineCommand) { | ||||
|   await page.getByTestId('custom-cmd-input').fill(JSON.stringify(cmd)) | ||||
|   await page.getByTestId('custom-cmd-send-button').click() | ||||
|   await page.fill('[data-testid="custom-cmd-input"]', JSON.stringify(cmd)) | ||||
|   await page.click('[data-testid="custom-cmd-send-button"]') | ||||
| } | ||||
|  | ||||
| async function clearCommandLogs(page: Page) { | ||||
|   await page.getByTestId('clear-commands').click() | ||||
|   await page.click('[data-testid="clear-commands"]') | ||||
| } | ||||
|  | ||||
| async function expectCmdLog(page: Page, locatorStr: string, timeout = 5000) { | ||||
|   await expect(page.locator(locatorStr).last()).toBeVisible({ timeout }) | ||||
| async function expectCmdLog(page: Page, locatorStr: string) { | ||||
|   await expect(page.locator(locatorStr).last()).toBeVisible() | ||||
| } | ||||
|  | ||||
| async function waitForDefaultPlanesToBeVisible(page: Page) { | ||||
| @ -106,57 +96,17 @@ async function waitForCmdReceive(page: Page, commandType: string) { | ||||
|     .waitFor() | ||||
| } | ||||
|  | ||||
| export const wiggleMove = async ( | ||||
|   page: any, | ||||
|   x: number, | ||||
|   y: number, | ||||
|   steps: number, | ||||
|   dist: number, | ||||
|   ang: number, | ||||
|   amplitude: 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: 5 }) | ||||
|   } | ||||
| } | ||||
| export async function getUtils(page: Page) { | ||||
|   // Chrome devtools protocol session only works in Chromium | ||||
|   const browserType = page.context().browser()?.browserType().name() | ||||
|   const cdpSession = | ||||
|     browserType !== 'chromium' ? null : await page.context().newCDPSession(page) | ||||
|  | ||||
| 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 }) | ||||
|   } | ||||
| } | ||||
|   let click00rCenter = { x: 0, y: 0 } | ||||
|   const click00 = (x: number, y: number) => | ||||
|     page.mouse.click(click00rCenter.x + x, click00rCenter.y + y) | ||||
|   let click00rLastPos = { x: 0, y: 0 } | ||||
|  | ||||
| export const getMovementUtils = (opts: any) => { | ||||
|   // The way we truncate is kinda odd apparently, so we need this function | ||||
|   // "[k]itty[c]ad round" | ||||
|   const kcRound = (n: number) => Math.trunc(n * 100) / 100 | ||||
| @ -165,8 +115,8 @@ export const getMovementUtils = (opts: any) => { | ||||
|   // NOTE: these pretty much can't be perfect because of screen scaling. | ||||
|   // Handle on a case-by-case. | ||||
|   const toU = (x: number, y: number) => [ | ||||
|     kcRound(x * 0.0678), | ||||
|     kcRound(-y * 0.0678), // Y is inverted in our coordinate system | ||||
|     kcRound(x * 0.0854), | ||||
|     kcRound(-y * 0.0854), // Y is inverted in our coordinate system | ||||
|   ] | ||||
|  | ||||
|   // Turn the array into a string with specific formatting | ||||
| @ -175,63 +125,8 @@ export const getMovementUtils = (opts: any) => { | ||||
|   // Combine because used often | ||||
|   const toSU = (xy: number[]) => fromUToString(toU(xy[0], xy[1])) | ||||
|  | ||||
|   // 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, { delay: 100 }) | ||||
|  | ||||
|   // Relative clicker, must keep state | ||||
|   let last = { x: 0, y: 0 } | ||||
|   const click00r = async (x?: number, y?: number) => { | ||||
|     // reset relative coordinates when anything is undefined | ||||
|     if (x === undefined || y === undefined) { | ||||
|       last.x = 0 | ||||
|       last.y = 0 | ||||
|       return | ||||
|     } | ||||
|  | ||||
|     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 [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() | ||||
|   const cdpSession = | ||||
|     browserType !== 'chromium' ? null : await page.context().newCDPSession(page) | ||||
|  | ||||
|   return { | ||||
|     waitForAuthSkipAppStart: () => waitForAuthAndLsp(page), | ||||
|     waitForAuthSkipAppStart: () => waitForPageLoad(page), | ||||
|     removeCurrentCode: () => removeCurrentCode(page), | ||||
|     sendCustomCmd: (cmd: EngineCommand) => sendCustomCmd(page, cmd), | ||||
|     updateCamPosition: async (xyz: [number, number, number]) => { | ||||
| @ -245,8 +140,7 @@ export async function getUtils(page: Page) { | ||||
|       await fillInput('z', xyz[2]) | ||||
|     }, | ||||
|     clearCommandLogs: () => clearCommandLogs(page), | ||||
|     expectCmdLog: (locatorStr: string, timeout = 5000) => | ||||
|       expectCmdLog(page, locatorStr, timeout), | ||||
|     expectCmdLog: (locatorStr: string) => expectCmdLog(page, locatorStr), | ||||
|     openKclCodePanel: () => openKclCodePanel(page), | ||||
|     closeKclCodePanel: () => closeKclCodePanel(page), | ||||
|     openDebugPanel: () => openDebugPanel(page), | ||||
| @ -270,8 +164,8 @@ export async function getUtils(page: Page) { | ||||
|       const angleXOffset = Math.cos(((angle - 180) * Math.PI) / 180) * px | ||||
|       const angleYOffset = Math.sin(((angle - 180) * Math.PI) / 180) * px | ||||
|       return { | ||||
|         x: Math.round(bbox.x + angleXOffset), | ||||
|         y: Math.round(bbox.y - angleYOffset), | ||||
|         x: bbox.x + angleXOffset, | ||||
|         y: bbox.y - angleYOffset, | ||||
|       } | ||||
|     }, | ||||
|     getAngle: async (locator: string) => { | ||||
| @ -283,8 +177,6 @@ export async function getUtils(page: Page) { | ||||
|         .locator(locator) | ||||
|         .boundingBox() | ||||
|         .then((box) => ({ ...box, x: box?.x || 0, y: box?.y || 0 })), | ||||
|     codeLocator: page.locator('.cm-content'), | ||||
|     canvasLocator: page.getByTestId('client-side-scene'), | ||||
|     doAndWaitForCmd: async ( | ||||
|       fn: () => Promise<void>, | ||||
|       commandType: string, | ||||
| @ -300,38 +192,6 @@ export async function getUtils(page: Page) { | ||||
|         await closeDebugPanel(page) | ||||
|       } | ||||
|     }, | ||||
|     /** | ||||
|      * Given an expected RGB value, diff if the channel with the largest difference | ||||
|      */ | ||||
|     getGreatestPixDiff: async ( | ||||
|       coords: { x: number; y: number }, | ||||
|       expected: [number, number, number] | ||||
|     ): Promise<number> => { | ||||
|       const buffer = await page.screenshot({ | ||||
|         fullPage: true, | ||||
|       }) | ||||
|       const screenshot = await PNG.sync.read(buffer) | ||||
|       // most likely related to pixel density but the screenshots for webkit are 2x the size | ||||
|       // there might be a more robust way of doing this. | ||||
|       const pixMultiplier = browserType === 'webkit' ? 2 : 1 | ||||
|       const index = | ||||
|         (screenshot.width * coords.y * pixMultiplier + | ||||
|           coords.x * pixMultiplier) * | ||||
|         4 // rbga is 4 channels | ||||
|       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) => { | ||||
|         await page.screenshot({ | ||||
| @ -384,6 +244,51 @@ export async function getUtils(page: Page) { | ||||
|  | ||||
|       cdpSession?.send('Network.emulateNetworkConditions', networkOptions) | ||||
|     }, | ||||
|     expectCodeToBe: async (str: string) => { | ||||
|       await expect(page.locator('.cm-content')).toHaveText(str) | ||||
|       await page.waitForTimeout(100) | ||||
|     }, | ||||
|     click00rSetCenter: (x: number, y: number) => { | ||||
|       click00rCenter = { x, y } | ||||
|     }, | ||||
|     click00r: (x?: number, y?: number) => { | ||||
|       // reset relative coordinates when anything is undefined | ||||
|       if (x === undefined || y === undefined) { | ||||
|         click00rLastPos.x = 0 | ||||
|         click00rLastPos.y = 0 | ||||
|         return | ||||
|       } | ||||
|  | ||||
|       const ret = click00(click00rLastPos.x + x, click00rLastPos.y + y) | ||||
|       click00rLastPos.x += x | ||||
|       click00rLastPos.y += y | ||||
|  | ||||
|       // Returns the new absolute coordinate if you need it. | ||||
|       return ret.then(() => [click00rLastPos.x, click00rLastPos.y]) | ||||
|     }, | ||||
|     toSU, | ||||
|     wiggleMove: async ( | ||||
|       x: number, | ||||
|       y: number, | ||||
|       steps: number, | ||||
|       dist: number, | ||||
|       ang: number, | ||||
|       amplitude: number, | ||||
|       freq: number | ||||
|     ) => { | ||||
|       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) { | ||||
|         const y1 = 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 }) | ||||
|       } | ||||
|     }, | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -533,8 +438,3 @@ export const doExport = async ( | ||||
|     outputType: output.type, | ||||
|   } | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Gets the appropriate modifier key for the platform. | ||||
|  */ | ||||
| export const metaModifier = os.platform() === 'darwin' ? 'Meta' : 'Control' | ||||
|  | ||||
| @ -2,7 +2,6 @@ import { browser, $, expect } from '@wdio/globals' | ||||
| import fs from 'fs/promises' | ||||
| import path from 'path' | ||||
| import os from 'os' | ||||
| import { click, setDatasetValue } from '../utils' | ||||
| 
 | ||||
| const isWin32 = os.platform() === 'win32' | ||||
| const documentsDir = path.join(os.homedir(), 'Documents') | ||||
| @ -16,8 +15,25 @@ const newProjectDir = path.join(documentsDir, 'a-different-directory') | ||||
| const tmp = process.env.TEMP || '/tmp' | ||||
| const userCodeDir = path.join(tmp, 'kittycad_user_code') | ||||
| 
 | ||||
| describe('ZMA sign in flow', () => { | ||||
|   before(async () => { | ||||
| async function click(element: WebdriverIO.Element): Promise<void> { | ||||
|   // Workaround for .click(), see https://github.com/tauri-apps/tauri/issues/6541
 | ||||
|   await element.waitForClickable() | ||||
|   await browser.execute('arguments[0].click();', element) | ||||
| } | ||||
| 
 | ||||
| /* Shoutout to @Sheap on Github for a great workaround utility: | ||||
|  * https://github.com/tauri-apps/tauri/issues/6541#issue-1638944060
 | ||||
|  */ | ||||
| async function setDatasetValue( | ||||
|   field: WebdriverIO.Element, | ||||
|   property: string, | ||||
|   value: string | ||||
| ) { | ||||
|   await browser.execute(`arguments[0].dataset.${property} = "${value}"`, field) | ||||
| } | ||||
| 
 | ||||
| describe('ZMA (Tauri)', () => { | ||||
|   it('opens the auth page and signs in', async () => { | ||||
|     // Clean up filesystem from previous tests
 | ||||
|     await new Promise((resolve) => setTimeout(resolve, 100)) | ||||
|     await fs.rm(defaultProjectDir, { force: true, recursive: true }) | ||||
| @ -26,9 +42,7 @@ describe('ZMA sign in flow', () => { | ||||
|     await fs.rm(userSettingsDir, { force: true, recursive: true }) | ||||
|     await fs.mkdir(defaultProjectDir, { recursive: true }) | ||||
|     await fs.mkdir(newProjectDir, { recursive: true }) | ||||
|   }) | ||||
| 
 | ||||
|   it('opens the auth page and signs in', async () => { | ||||
|     const signInButton = await $('[data-testid="sign-in-button"]') | ||||
|     expect(await signInButton.getText()).toEqual('Sign in') | ||||
| 
 | ||||
| @ -68,10 +82,6 @@ describe('ZMA sign in flow', () => { | ||||
|     const newFileButton = await $('[data-testid="home-new-file"]') | ||||
|     expect(await newFileButton.getText()).toEqual('New project') | ||||
|   }) | ||||
| }) | ||||
| 
 | ||||
| describe('ZMA authorized user flows', () => { | ||||
|   // Note: each flow below is intended to start *and* end from the home page
 | ||||
| 
 | ||||
|   it('opens the settings page, checks filesystem settings, and closes the settings page', async () => { | ||||
|     const menuButton = await $('[data-testid="user-sidebar-toggle"]') | ||||
| @ -140,11 +150,8 @@ describe('ZMA authorized user flows', () => { | ||||
|     const base = isWin32 ? 'http://tauri.localhost' : 'tauri://localhost' | ||||
|     await browser.execute(`window.location.href = "${base}/home"`) | ||||
|   }) | ||||
| }) | ||||
| 
 | ||||
| describe('ZMA sign out flow', () => { | ||||
|   it('signs out', async () => { | ||||
|     await new Promise((resolve) => setTimeout(resolve, 1000)) | ||||
|     const menuButton = await $('[data-testid="user-sidebar-toggle"]') | ||||
|     await click(menuButton) | ||||
|     const signoutButton = await $('[data-testid="user-sidebar-sign-out"]') | ||||
| @ -1,18 +0,0 @@ | ||||
| import { browser } from '@wdio/globals' | ||||
|  | ||||
| export async function click(element: WebdriverIO.Element): Promise<void> { | ||||
|   // Workaround for .click(), see https://github.com/tauri-apps/tauri/issues/6541 | ||||
|   await element.waitForClickable() | ||||
|   await browser.execute('arguments[0].click();', element) | ||||
| } | ||||
|  | ||||
| /* Shoutout to @Sheap on Github for a great workaround utility: | ||||
|  * https://github.com/tauri-apps/tauri/issues/6541#issue-1638944060 | ||||
|  */ | ||||
| export async function setDatasetValue( | ||||
|   field: WebdriverIO.Element, | ||||
|   property: string, | ||||
|   value: string | ||||
| ) { | ||||
|   await browser.execute(`arguments[0].dataset.${property} = "${value}"`, field) | ||||
| } | ||||
							
								
								
									
										3
									
								
								examples/addition.cado
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,3 @@ | ||||
| // comment | ||||
|  | ||||
| const hi = 5 + 4 | ||||
							
								
								
									
										62
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							
							
						
						| @ -1,62 +0,0 @@ | ||||
| { | ||||
|   "nodes": { | ||||
|     "nixpkgs": { | ||||
|       "locked": { | ||||
|         "lastModified": 1718470082, | ||||
|         "narHash": "sha256-u2F0MMYE+Efc+ocruTbtU/wWHuYHWcJafp5zJ++n/YE=", | ||||
|         "owner": "NixOS", | ||||
|         "repo": "nixpkgs", | ||||
|         "rev": "3027ba73dfef68eb555fc2fa97aed4e999e74f97", | ||||
|         "type": "github" | ||||
|       }, | ||||
|       "original": { | ||||
|         "owner": "NixOS", | ||||
|         "ref": "nixpkgs-unstable", | ||||
|         "repo": "nixpkgs", | ||||
|         "type": "github" | ||||
|       } | ||||
|     }, | ||||
|     "nixpkgs_2": { | ||||
|       "locked": { | ||||
|         "lastModified": 1718428119, | ||||
|         "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", | ||||
|         "owner": "NixOS", | ||||
|         "repo": "nixpkgs", | ||||
|         "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", | ||||
|         "type": "github" | ||||
|       }, | ||||
|       "original": { | ||||
|         "owner": "NixOS", | ||||
|         "ref": "nixpkgs-unstable", | ||||
|         "repo": "nixpkgs", | ||||
|         "type": "github" | ||||
|       } | ||||
|     }, | ||||
|     "root": { | ||||
|       "inputs": { | ||||
|         "nixpkgs": "nixpkgs", | ||||
|         "rust-overlay": "rust-overlay" | ||||
|       } | ||||
|     }, | ||||
|     "rust-overlay": { | ||||
|       "inputs": { | ||||
|         "nixpkgs": "nixpkgs_2" | ||||
|       }, | ||||
|       "locked": { | ||||
|         "lastModified": 1718681902, | ||||
|         "narHash": "sha256-E/T7Ge6ayEQe7FVKMJqDBoHyLhRhjc6u9CmU8MyYfy0=", | ||||
|         "owner": "oxalica", | ||||
|         "repo": "rust-overlay", | ||||
|         "rev": "16c8ad83297c278eebe740dea5491c1708960dd1", | ||||
|         "type": "github" | ||||
|       }, | ||||
|       "original": { | ||||
|         "owner": "oxalica", | ||||
|         "repo": "rust-overlay", | ||||
|         "type": "github" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "root": "root", | ||||
|   "version": 7 | ||||
| } | ||||
							
								
								
									
										70
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						| @ -1,70 +0,0 @@ | ||||
| { | ||||
|   description = "modeling-app development environment"; | ||||
|  | ||||
|   # Flake inputs | ||||
|   inputs = { | ||||
|     nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||||
|     rust-overlay.url = "github:oxalica/rust-overlay"; # A helper for Rust + Nix | ||||
|   }; | ||||
|  | ||||
|   # Flake outputs | ||||
|   outputs = { self, nixpkgs, rust-overlay }: | ||||
|     let | ||||
|       # Overlays enable you to customize the Nixpkgs attribute set | ||||
|       overlays = [ | ||||
|         # Makes a `rust-bin` attribute available in Nixpkgs | ||||
|         (import rust-overlay) | ||||
|         # Provides a `rustToolchain` attribute for Nixpkgs that we can use to | ||||
|         # create a Rust environment | ||||
|         (self: super: { | ||||
|           rustToolchain = super. rust-bin.stable.latest.default.override { | ||||
|             targets = [ "wasm32-unknown-unknown" ]; | ||||
|             extensions = [ "rustfmt" "llvm-tools-preview" ]; | ||||
|           }; | ||||
|         }) | ||||
|       ]; | ||||
|  | ||||
|       # Systems supported | ||||
|       allSystems = [ | ||||
|         "x86_64-linux" # 64-bit Intel/AMD Linux | ||||
|         "aarch64-linux" # 64-bit ARM Linux | ||||
|         "x86_64-darwin" # 64-bit Intel macOS | ||||
|         "aarch64-darwin" # 64-bit ARM macOS | ||||
|       ]; | ||||
|  | ||||
|       # Helper to provide system-specific attributes | ||||
|       forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { | ||||
|         pkgs = import nixpkgs { inherit overlays system; }; | ||||
|       }); | ||||
|  | ||||
|     in | ||||
|     { | ||||
|       # Development environment output | ||||
|       devShells = forAllSystems ({ pkgs }: { | ||||
|         default = pkgs.mkShell { | ||||
|           # The Nix packages provided in the environment | ||||
|           packages = (with pkgs; [ | ||||
|             # The package provided by our custom overlay. Includes cargo, Clippy, cargo-fmt, | ||||
|             # rustdoc, rustfmt, and other tools. | ||||
|             rustToolchain | ||||
|  | ||||
|             cargo-llvm-cov | ||||
|             cargo-nextest | ||||
|  | ||||
|             just | ||||
|             postgresql.lib | ||||
|             openssl | ||||
|             pkg-config | ||||
|  | ||||
|             nodejs_22 | ||||
|           ]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [ | ||||
|             libiconv  | ||||
|             darwin.apple_sdk.frameworks.Security | ||||
|           ]); | ||||
|  | ||||
|           TARGET_CC = "${pkgs.stdenv.cc}/bin/${pkgs.stdenv.cc.targetPrefix}cc"; | ||||
|           LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; | ||||
|         }; | ||||
|       }); | ||||
|     }; | ||||
| } | ||||
							
								
								
									
										69
									
								
								package.json
									
									
									
									
									
								
							
							
						
						| @ -1,43 +1,49 @@ | ||||
| { | ||||
|   "name": "untitled-app", | ||||
|   "version": "0.23.0", | ||||
|   "version": "0.21.9", | ||||
|   "private": true, | ||||
|   "dependencies": { | ||||
|     "@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", | ||||
|     "@codemirror/autocomplete": "^6.16.0", | ||||
|     "@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.69", | ||||
|     "@kittycad/lib": "^0.0.64", | ||||
|     "@lezer/javascript": "^1.4.9", | ||||
|     "@open-rpc/client-js": "^1.8.1", | ||||
|     "@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.5", | ||||
|     "@tauri-apps/plugin-fs": "^2.0.0-beta.3", | ||||
|     "@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", | ||||
|     "codemirror": "^6.0.1", | ||||
|     "crypto-js": "^4.2.0", | ||||
|     "debounce-promise": "^3.1.2", | ||||
|     "decamelize": "^6.0.0", | ||||
|     "formik": "^2.4.6", | ||||
|     "fuse.js": "^7.0.0", | ||||
|     "html2canvas-pro": "^1.5.1", | ||||
|     "html2canvas-pro": "^1.4.3", | ||||
|     "http-server": "^14.1.1", | ||||
|     "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", | ||||
| @ -48,15 +54,20 @@ | ||||
|     "react-modal-promise": "^1.0.2", | ||||
|     "react-router-dom": "^6.23.1", | ||||
|     "sketch-helpers": "^0.0.4", | ||||
|     "three": "^0.166.1", | ||||
|     "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", | ||||
|     "vscode-uri": "^3.0.8", | ||||
|     "wasm-pack": "^0.12.1", | ||||
|     "web-vitals": "^3.5.2", | ||||
|     "xstate": "^4.38.2" | ||||
|     "ws": "^8.17.0", | ||||
|     "xstate": "^4.38.2", | ||||
|     "zustand": "^4.5.2" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "start": "vite", | ||||
| @ -73,19 +84,18 @@ | ||||
|     "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 ./packages", | ||||
|     "fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages", | ||||
|     "fmt": "prettier --write ./src *.ts *.json *.js ./e2e", | ||||
|     "fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e", | ||||
|     "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 --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": "(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-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", | ||||
|     "lint": "eslint --fix src", | ||||
|     "bump-jsons": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json && echo \"$(jq --arg v \"$VERSION\" '.version=$v' src-tauri/tauri.conf.json --indent 2)\" > src-tauri/tauri.conf.json", | ||||
|     "postinstall": "yarn xstate:typegen", | ||||
|     "xstate:typegen": "yarn xstate typegen \"src/**/*.ts?(x)\"", | ||||
|     "make:dev": "make dev" | ||||
|     "xstate:typegen": "yarn xstate typegen \"src/**/*.ts?(x)\"" | ||||
|   }, | ||||
|   "prettier": { | ||||
|     "trailingComma": "es5", | ||||
| @ -109,16 +119,13 @@ | ||||
|     "@babel/plugin-proposal-private-property-in-object": "^7.21.11", | ||||
|     "@babel/preset-env": "^7.24.3", | ||||
|     "@iarna/toml": "^2.2.5", | ||||
|     "@playwright/test": "^1.45.1", | ||||
|     "@tauri-apps/cli": "==2.0.0-beta.13", | ||||
|     "@testing-library/jest-dom": "^5.14.1", | ||||
|     "@testing-library/react": "^15.0.2", | ||||
|     "@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", | ||||
|     "@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", | ||||
| @ -138,27 +145,21 @@ | ||||
|     "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.8", | ||||
|     "prettier": "^2.8.0", | ||||
|     "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.13.0", | ||||
|     "ws": "^8.17.0", | ||||
|     "yarn": "^1.22.22" | ||||
|   } | ||||
| } | ||||
|  | ||||
							
								
								
									
										6
									
								
								packages/codemirror-lsp-client/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,6 +0,0 @@ | ||||
| node_modules | ||||
| build | ||||
| dist | ||||
| tsconfig.tsbuildinfo | ||||
| *.d.ts | ||||
| *.js | ||||
| @ -1,35 +0,0 @@ | ||||
| { | ||||
|   "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,13 +0,0 @@ | ||||
| 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,113 +0,0 @@ | ||||
| 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 | ||||
| } | ||||
| @ -1,131 +0,0 @@ | ||||
| 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, | ||||
|   } | ||||
| } | ||||
| @ -1,51 +0,0 @@ | ||||
| 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]) | ||||
| ) | ||||
| @ -1,27 +0,0 @@ | ||||
| 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 | ||||
| } | ||||
| @ -1,22 +0,0 @@ | ||||
| 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', | ||||
|     }), | ||||
|   ] | ||||
| } | ||||
