Compare commits
	
		
			4 Commits
		
	
	
		
			kcl-61
			...
			safe-reset
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 10c51896be | |||
| 34f05b3cf2 | |||
| 3c89ac8421 | |||
| d3f788050c | 
| @ -1,3 +1,3 @@ | ||||
| [codespell] | ||||
| ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser,fromM,FromM | ||||
| ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser | ||||
| skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo | ||||
|  | ||||
							
								
								
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,5 @@ | ||||
| name: Bug Report | ||||
| description: File a bug report for the Zoo Design Studio | ||||
| description: File a bug report for the Zoo Modeling App | ||||
| title: "[BUG]: " | ||||
| labels: ["bug"] | ||||
| assignees: [] | ||||
| @ -70,7 +70,7 @@ body: | ||||
|     id: version | ||||
|     attributes: | ||||
|       label: Version | ||||
|       description: "The version of the Zoo Design Studio you're using." | ||||
|       description: "The version of the Zoo Modeling App you're using." | ||||
|       placeholder: "example: v0.15.0. You can find this in the settings." | ||||
|     validations: | ||||
|       required: true | ||||
|  | ||||
							
								
								
									
										24
									
								
								.github/ci-cd-scripts/start-vector-macos.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/ci-cd-scripts/start-vector-macos.sh
									
									
									
									
										vendored
									
									
								
							| @ -1,24 +0,0 @@ | ||||
| #!/bin/bash | ||||
| set -euo pipefail | ||||
|  | ||||
| # Install vector | ||||
| brew tap vectordotdev/brew && brew install vector | ||||
|  | ||||
| # Configure vector | ||||
| mkdir -p /tmp/vector | ||||
| cp .github/workflows/vector.toml /tmp/vector.toml | ||||
| sed -i '' "s#OS_NAME#${OS_NAME}#g" /tmp/vector.toml | ||||
| sed -i '' "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml | ||||
| sed -i '' "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml | ||||
| sed -i '' "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml | ||||
| sed -i '' "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml | ||||
| sed -i '' "s#GH_ACTIONS_AXIOM_TOKEN#${GH_ACTIONS_AXIOM_TOKEN}#g" /tmp/vector.toml | ||||
|  | ||||
| # Display settings | ||||
| echo | ||||
| echo 'Vector config:' | ||||
| cat /tmp/vector.toml | ||||
| echo | ||||
|  | ||||
| # Start in the background | ||||
| $(brew --prefix)/opt/vector/bin/vector --config /tmp/vector.toml & | ||||
							
								
								
									
										24
									
								
								.github/ci-cd-scripts/start-vector-ubuntu.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/ci-cd-scripts/start-vector-ubuntu.sh
									
									
									
									
										vendored
									
									
								
							| @ -1,24 +0,0 @@ | ||||
| #!/bin/bash | ||||
| set -euo pipefail | ||||
|  | ||||
| # Install vector | ||||
| curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash -s -- -y | ||||
|  | ||||
| # Configure vector | ||||
| mkdir -p /tmp/vector | ||||
| cp .github/workflows/vector.toml /tmp/vector.toml | ||||
| sed -i "s#OS_NAME#${OS_NAME}#g" /tmp/vector.toml | ||||
| sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml | ||||
| sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml | ||||
| sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml | ||||
| sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml | ||||
| sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${GH_ACTIONS_AXIOM_TOKEN}#g" /tmp/vector.toml | ||||
|  | ||||
| # Display settings | ||||
| echo | ||||
| echo 'Vector config:' | ||||
| cat /tmp/vector.toml | ||||
| echo | ||||
|  | ||||
| # Start in background | ||||
| ${HOME}/.vector/bin/vector --config /tmp/vector.toml & | ||||
							
								
								
									
										2
									
								
								.github/workflows/build-and-store-wasm.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build-and-store-wasm.yml
									
									
									
									
										vendored
									
									
								
							| @ -24,7 +24,7 @@ jobs: | ||||
|         uses: actions-rust-lang/setup-rust-toolchain@v1 | ||||
|         with: | ||||
|           cache: false # Configured below. | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
|       - name: Rust Cache | ||||
|  | ||||
							
								
								
									
										13
									
								
								.github/workflows/build-apps.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/build-apps.yml
									
									
									
									
										vendored
									
									
								
							| @ -77,7 +77,7 @@ jobs: | ||||
|         with: | ||||
|           cache: false # Configured below. | ||||
|  | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }} | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
| @ -207,13 +207,6 @@ jobs: | ||||
|           smctl.exe keypair ls | ||||
|           C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user | ||||
|           smksp_cert_sync.exe | ||||
|           smctl windows certsync | ||||
|         # This last line `smctl windows certsync` was added after windows codesign failures started happening | ||||
|         # with nightly-v25.4.10. It looks like `smksp_cert_sync.exe` used to do the sync to the local cert store, | ||||
|         # but stopped doing it overnight. This extra call that I randomly got from this azure-related doc page | ||||
|         # https://docs.digicert.com/en/digicert-keylocker/code-signing/sign-with-third-party-signing-tools/windows-applications/sign-azure-apps-with-signtool-using-ksp-library.html#sync-certificates--windows-only--618365 | ||||
|         # seems to be doing that extra sync that we need for scripts/sign-win.js to work. | ||||
|         # TODO: we still need to make sign-win.js errors fail the workflow, see issue #6276 | ||||
|         shell: cmd | ||||
|  | ||||
|       - name: Build the app (debug) | ||||
| @ -248,7 +241,7 @@ jobs: | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: out-arm64-${{ matrix.platform }} | ||||
|           # first two will pick both Zoo Design Studio-$VERSION-arm64-win.exe and Zoo Design Studio-$VERSION-win.exe | ||||
|           # first two will pick both Zoo Modeling App-$VERSION-arm64-win.exe and Zoo Modeling App-$VERSION-win.exe | ||||
|           path: | | ||||
|             out/*-${{ env.VERSION_NO_V }}-win.* | ||||
|             out/*-${{ env.VERSION_NO_V }}-arm64-win.* | ||||
| @ -385,7 +378,7 @@ jobs: | ||||
|           NOTES: ${{ needs.prepare-files.outputs.notes }} | ||||
|           PUB_DATE: ${{ github.event.repository.updated_at }} | ||||
|           WEBSITE_DIR: ${{ env.IS_NIGHTLY == 'true' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }} | ||||
|           URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Design%20Studio%20%28Nightly%29' || 'Zoo%20Design%20Studio' }} | ||||
|           URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }} | ||||
|         run: | | ||||
|           RELEASE_DIR=https://${WEBSITE_DIR} | ||||
|           jq --null-input \ | ||||
|  | ||||
							
								
								
									
										19
									
								
								.github/workflows/cargo-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/cargo-test.yml
									
									
									
									
										vendored
									
									
								
							| @ -34,11 +34,20 @@ jobs: | ||||
|         uses: actions-rust-lang/setup-rust-toolchain@v1 | ||||
|         with: | ||||
|           cache: false # Configured below. | ||||
|       - name: Start Vector | ||||
|         run: .github/ci-cd-scripts/start-vector-ubuntu.sh | ||||
|         env: | ||||
|           GH_ACTIONS_AXIOM_TOKEN: ${{ secrets.GH_ACTIONS_AXIOM_TOKEN }} | ||||
|           OS_NAME: ${{ env.OS_NAME }} | ||||
|       - name: Install vector | ||||
|         run: | | ||||
|           curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh | ||||
|           chmod +x /tmp/vector.sh | ||||
|           /tmp/vector.sh -y -no-modify-path | ||||
|           mkdir -p /tmp/vector | ||||
|           cp .github/workflows/vector.toml /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml | ||||
|           sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml | ||||
|           cat /tmp/vector.toml | ||||
|           ${HOME}/.vector/bin/vector --config /tmp/vector.toml & | ||||
|       - uses: taiki-e/install-action@cargo-llvm-cov | ||||
|       - uses: taiki-e/install-action@nextest | ||||
|       - name: Install just | ||||
|  | ||||
							
								
								
									
										42
									
								
								.github/workflows/e2e-tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										42
									
								
								.github/workflows/e2e-tests.yml
									
									
									
									
										vendored
									
									
								
							| @ -140,7 +140,7 @@ jobs: | ||||
|         with: | ||||
|           cache: false # Configured below. | ||||
|  | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && steps.wasm.outputs.should-build-wasm == 'true' }} | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
| @ -231,11 +231,6 @@ jobs: | ||||
|         env: | ||||
|           token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|           snapshottoken: ${{ secrets.KITTYCAD_API_TOKEN }} | ||||
|           TAB_API_URL: ${{ secrets.TAB_API_URL }} | ||||
|           TAB_API_KEY: ${{ secrets.TAB_API_KEY }} | ||||
|           CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | ||||
|           CI_PR_NUMBER: ${{ github.event.pull_request.number }} | ||||
|           TARGET: web | ||||
|  | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && !cancelled() && (success() || failure()) }} | ||||
| @ -286,7 +281,7 @@ jobs: | ||||
|         os: | ||||
|           - "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64" | ||||
|           - namespace-profile-macos-8-cores | ||||
|           - windows-latest-8-cores | ||||
|           - windows-latest | ||||
|         shardIndex: [1, 2, 3, 4] | ||||
|         shardTotal: [4] | ||||
|         # Disable macos and windows tests on hourly e2e tests since we only care | ||||
| @ -297,7 +292,7 @@ jobs: | ||||
|         exclude: | ||||
|           - os: namespace-profile-macos-8-cores | ||||
|             isScheduled: true | ||||
|           - os: windows-latest-8-cores | ||||
|           - os: windows-latest | ||||
|             isScheduled: true | ||||
|         # TODO: add ref here for main and latest release tag | ||||
|     runs-on: ${{ matrix.os }} | ||||
| @ -344,12 +339,22 @@ jobs: | ||||
|         if: needs.conditions.outputs.should-run == 'true' | ||||
|         run: yarn tronb:vite:dev | ||||
|  | ||||
|       - name: Start Vector | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && !contains(matrix.os, 'windows') }} | ||||
|         run: .github/ci-cd-scripts/start-vector-${{ env.OS_NAME }}.sh | ||||
|         env: | ||||
|           GH_ACTIONS_AXIOM_TOKEN: ${{ secrets.GH_ACTIONS_AXIOM_TOKEN }} | ||||
|           OS_NAME: ${{ env.OS_NAME }} | ||||
|       - name: Install vector | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && contains(matrix.os, 'ubuntu') }} | ||||
|         shell: bash | ||||
|         run: | | ||||
|           curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh | ||||
|           chmod +x /tmp/vector.sh | ||||
|           /tmp/vector.sh -y -no-modify-path | ||||
|           mkdir -p /tmp/vector | ||||
|           cp .github/workflows/vector.toml /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_WORKFLOW#${GITHUB_WORKFLOW}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REPOSITORY#${GITHUB_REPOSITORY}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_SHA#${GITHUB_SHA}#g" /tmp/vector.toml | ||||
|           sed -i "s#GITHUB_REF_NAME#${GITHUB_REF_NAME}#g" /tmp/vector.toml | ||||
|           sed -i "s#GH_ACTIONS_AXIOM_TOKEN#${{secrets.GH_ACTIONS_AXIOM_TOKEN}}#g" /tmp/vector.toml | ||||
|           cat /tmp/vector.toml | ||||
|           ${HOME}/.vector/bin/vector --config /tmp/vector.toml & | ||||
|  | ||||
|       - uses: actions/download-artifact@v4 | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && !cancelled() && (success() || failure()) }} | ||||
| @ -365,16 +370,11 @@ jobs: | ||||
|         with: | ||||
|           shell: bash | ||||
|           command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{ env.OS_NAME }} | ||||
|           timeout_minutes: 30 | ||||
|           max_attempts: 9 | ||||
|           timeout_minutes: 45 | ||||
|           max_attempts: 15 | ||||
|         env: | ||||
|           FAIL_ON_CONSOLE_ERRORS: true | ||||
|           token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }} | ||||
|           TAB_API_URL: ${{ secrets.TAB_API_URL }} | ||||
|           TAB_API_KEY: ${{ secrets.TAB_API_KEY }} | ||||
|           CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | ||||
|           CI_PR_NUMBER: ${{ github.event.pull_request.number }} | ||||
|           TARGET: desktop | ||||
|  | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         if: ${{ needs.conditions.outputs.should-run == 'true' && always() }} | ||||
|  | ||||
							
								
								
									
										55
									
								
								.github/workflows/nix.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								.github/workflows/nix.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,55 +0,0 @@ | ||||
| name: Test Nix Flake | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: [main] | ||||
|   pull_request: | ||||
|   workflow_dispatch: | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||
|   cancel-in-progress: true | ||||
| jobs: | ||||
|   nix-flake-check: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|         with: | ||||
|           submodules: recursive | ||||
|  | ||||
|       - uses: cachix/install-nix-action@v31 | ||||
|         with: | ||||
|           nix_path: nixpkgs=channel:nixos-unstable | ||||
|  | ||||
|       - name: nix flake check for all platforms | ||||
|         run: | | ||||
|           nix flake check --all-systems | ||||
|  | ||||
|   nix-build-linux: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|         with: | ||||
|           submodules: recursive | ||||
|  | ||||
|       - uses: cachix/install-nix-action@v31 | ||||
|         with: | ||||
|           nix_path: nixpkgs=channel:nixos-unstable | ||||
|  | ||||
|       - name: nix build . for x86_64-linux | ||||
|         run: nix build . | ||||
|  | ||||
|   nix-build-macos: | ||||
|     runs-on: macos-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|         with: | ||||
|           submodules: recursive | ||||
|  | ||||
|       - uses: cachix/install-nix-action@v31 | ||||
|         with: | ||||
|           nix_path: nixpkgs=channel:nixos-unstable | ||||
|  | ||||
|       - name: nix build . for x86_64-darwin | ||||
|         run: nix build . | ||||
|  | ||||
							
								
								
									
										6
									
								
								.github/workflows/static-analysis.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/static-analysis.yml
									
									
									
									
										vendored
									
									
								
							| @ -51,7 +51,7 @@ jobs: | ||||
|         with: | ||||
|           cache: false # Configured below. | ||||
|  | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
|  | ||||
| @ -191,7 +191,7 @@ jobs: | ||||
|           cache: 'yarn' | ||||
|  | ||||
|       - run: yarn install | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
|  | ||||
| @ -236,7 +236,7 @@ jobs: | ||||
|           cache: 'yarn' | ||||
|  | ||||
|       - run: yarn install | ||||
|       - uses: taiki-e/install-action@d4635f2de61c8b8104d59cd4aede2060638378cc | ||||
|       - uses: taiki-e/install-action@37bdc826eaedac215f638a96472df572feab0f9b | ||||
|         with: | ||||
|           tool: wasm-pack | ||||
|  | ||||
|  | ||||
							
								
								
									
										1
									
								
								.github/workflows/vector.toml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/vector.toml
									
									
									
									
										vendored
									
									
								
							| @ -8,7 +8,6 @@ include = ["/tmp/github-actions.log"] | ||||
| type = "remap" | ||||
| inputs = [ "github-actions-file" ] | ||||
| source = ''' | ||||
| .platform = "OS_NAME" | ||||
| .action = "GITHUB_WORKFLOW" | ||||
| .repo = "GITHUB_REPOSITORY" | ||||
| .sha = "GITHUB_SHA" | ||||
|  | ||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -26,7 +26,6 @@ yarn-error.log* | ||||
| .idea | ||||
| .vscode | ||||
| .helix | ||||
| result | ||||
|  | ||||
| # rust | ||||
| rust/target | ||||
|  | ||||
							
								
								
									
										20
									
								
								INSTALL.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								INSTALL.md
									
									
									
									
									
								
							| @ -1,27 +1,27 @@ | ||||
| # Setting Up Zoo Design Studio | ||||
| # Setting Up Zoo Modeling App | ||||
|  | ||||
| Compared to other CAD software, getting Zoo Design Studio up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install. | ||||
| Compared to other CAD software, getting Zoo Modeling App up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install. | ||||
|  | ||||
| ## Windows | ||||
|  | ||||
| 1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type. | ||||
| 1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type. | ||||
|  | ||||
| 2. Once downloaded, run the installer `Zoo Design Studio-{version}-{arch}-win.exe` which should take a few seconds. | ||||
| 2. Once downloaded, run the installer `Zoo Modeling App-{version}-{arch}-win.exe` which should take a few seconds. | ||||
|  | ||||
| 3. The installation happens at `C:\Program Files\Zoo Design Studio`. A shortcut in the start menu is also created so you can run the app easily by clicking on it. | ||||
| 3. The installation happens at `C:\Program Files\Zoo Modeling App`. A shortcut in the start menu is also created so you can run the app easily by clicking on it. | ||||
|  | ||||
| ## macOS | ||||
|  | ||||
| 1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type. | ||||
| 1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type. | ||||
|  | ||||
| 2. Once downloaded, open the disk image `Zoo Design Studio-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory. | ||||
| 2. Once downloaded, open the disk image `Zoo Modeling App-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory. | ||||
|  | ||||
| 3. You can then open your `Applications` directory and double-click on `Zoo Design Studio` to open. | ||||
| 3. You can then open your `Applications` directory and double-click on `Zoo Modeling App` to open. | ||||
|  | ||||
|  | ||||
| ## Linux  | ||||
|  | ||||
| 1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type. | ||||
| 1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type. | ||||
|  | ||||
| 2. Install the dependencies needed to run the [AppImage format](https://appimage.org/). | ||||
|     -  On Ubuntu, install the FUSE library with these commands in a terminal. | ||||
| @ -30,7 +30,7 @@ Compared to other CAD software, getting Zoo Design Studio up and running is quic | ||||
|        sudo apt install libfuse2 | ||||
|        ``` | ||||
|     - Optionally, follow [these steps](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md#initial-setup) to install `appimaged`. It is a daemon that makes interacting with AppImage files more seamless.  | ||||
|     - Once installed, copy the downloaded `Zoo Design Studio-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`. | ||||
|     - Once installed, copy the downloaded `Zoo Modeling App-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`. | ||||
|  | ||||
|    - `appimaged` should automatically find it and make it executable. If not, run: | ||||
|      ```bash | ||||
|  | ||||
							
								
								
									
										47
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								Makefile
									
									
									
									
									
								
							| @ -5,18 +5,11 @@ all: install build check | ||||
| # INSTALL | ||||
|  | ||||
| ifeq ($(OS),Windows_NT) | ||||
| export WINDOWS := true | ||||
| ifndef MSYSTEM | ||||
| export POWERSHELL := true | ||||
| endif | ||||
| endif | ||||
|  | ||||
| ifdef WINDOWS | ||||
| CARGO ?= $(USERPROFILE)/.cargo/bin/cargo.exe | ||||
| WASM_PACK ?= $(USERPROFILE)/.cargo/bin/wasm-pack.exe | ||||
| 	CARGO ?= ~/.cargo/bin/cargo.exe | ||||
| 	WASM_PACK ?= ~/.cargo/bin/wasm-pack.exe | ||||
| else | ||||
| CARGO ?= ~/.cargo/bin/cargo | ||||
| WASM_PACK ?= ~/.cargo/bin/wasm-pack | ||||
| 	CARGO ?= ~/.cargo/bin/cargo | ||||
| 	WASM_PACK ?= ~/.cargo/bin/wasm-pack | ||||
| endif | ||||
|  | ||||
| .PHONY: install | ||||
| @ -24,21 +17,21 @@ install: node_modules/.yarn-integrity $(CARGO) $(WASM_PACK) ## Install dependenc | ||||
|  | ||||
| node_modules/.yarn-integrity: package.json yarn.lock | ||||
| 	yarn install | ||||
| ifdef POWERSHELL | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	@ type nul > $@ | ||||
| else | ||||
| 	@ touch $@ | ||||
| endif | ||||
|  | ||||
| $(CARGO): | ||||
| ifdef WINDOWS | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	yarn install:rust:windows | ||||
| else | ||||
| 	yarn install:rust | ||||
| endif | ||||
|  | ||||
| $(WASM_PACK): | ||||
| ifdef WINDOWS | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	yarn install:wasm-pack:cargo | ||||
| else | ||||
| 	yarn install:wasm-pack:sh | ||||
| @ -64,7 +57,7 @@ build-web: install public/kcl_wasm_lib_bg.wasm build/index.html | ||||
| build-desktop: install public/kcl_wasm_lib_bg.wasm .vite/build/main.js | ||||
|  | ||||
| public/kcl_wasm_lib_bg.wasm: $(CARGO_SOURCES) $(RUST_SOURCES) | ||||
| ifdef WINDOWS | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	yarn build:wasm:dev:windows | ||||
| else | ||||
| 	yarn build:wasm:dev | ||||
| @ -94,7 +87,7 @@ lint: install ## Lint the code | ||||
| ############################################################################### | ||||
| # RUN | ||||
|  | ||||
| TARGET ?= desktop | ||||
| TARGET ?= web | ||||
|  | ||||
| .PHONY: run | ||||
| run: run-$(TARGET) | ||||
| @ -110,9 +103,9 @@ run-desktop: install build-desktop ## Start the desktop app | ||||
| ############################################################################### | ||||
| # TEST | ||||
|  | ||||
| E2E_GREP ?= | ||||
| E2E_WORKERS ?= | ||||
| E2E_WORKERS ?= 1 | ||||
| E2E_FAILURES ?= 1 | ||||
| E2E_GREP ?= "" | ||||
|  | ||||
| .PHONY: test | ||||
| test: test-unit test-e2e | ||||
| @ -128,27 +121,19 @@ test-e2e: test-e2e-$(TARGET) | ||||
| .PHONY: test-e2e-web | ||||
| test-e2e-web: install build-web ## Run the web e2e tests | ||||
| 	@ curl -fs localhost:3000 >/dev/null || ( echo "Error: localhost:3000 not available, 'make run-web' first" && exit 1 ) | ||||
| ifdef E2E_GREP | ||||
| 	yarn chrome:test --headed --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES) | ||||
| else | ||||
| 	yarn chrome:test --headed --workers='100%' | ||||
| endif | ||||
| 	yarn chrome:test --headed --workers=$(E2E_WORKERS) --max-failures=$(E2E_FAILURES) --grep=$(E2E_GREP) | ||||
|  | ||||
| .PHONY: test-e2e-desktop | ||||
| test-e2e-desktop: install build-desktop ## Run the desktop e2e tests | ||||
| ifdef E2E_GREP | ||||
| 	yarn test:playwright:electron --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES) | ||||
| else | ||||
| 	yarn test:playwright:electron --workers='100%' | ||||
| endif | ||||
| 	yarn test:playwright:electron --workers=$(E2E_WORKERS) --max-failures=$(E2E_FAILURES) --grep="$(E2E_GREP)" | ||||
|  | ||||
| ############################################################################### | ||||
| # CLEAN | ||||
|  | ||||
| .PHONY: clean | ||||
| clean: ## Delete all artifacts | ||||
| ifdef POWERSHELL | ||||
| 	git clean --force -d -x --exclude=.env* --exclude=**/*.env | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	git clean --force -d -X | ||||
| else | ||||
| 	rm -rf .vite/ build/ | ||||
| 	rm -rf trace.zip playwright-report/ test-results/ | ||||
| @ -159,7 +144,7 @@ endif | ||||
|  | ||||
| .PHONY: help | ||||
| help: install | ||||
| ifdef POWERSHELL | ||||
| ifeq ($(OS),Windows_NT) | ||||
| 	@ powershell -Command "Get-Content $(MAKEFILE_LIST) | Select-String -Pattern '^[^\s]+:.*##\s.*$$' | ForEach-Object { $$line = $$_.Line -split ':.*?##\s+'; Write-Host -NoNewline $$line[0].PadRight(30) -ForegroundColor Cyan; Write-Host $$line[1] }" | ||||
| else | ||||
| 	@ grep -E '^[^[:space:]]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||||
|  | ||||
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @ -1,17 +1,17 @@ | ||||
|  | ||||
|  | ||||
|  | ||||
| ## Zoo Design Studio | ||||
| ## Zoo Modeling App | ||||
|  | ||||
| download at [zoo.dev/modeling-app/download](https://zoo.dev/modeling-app/download) | ||||
|  | ||||
| A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev). | ||||
|  | ||||
| Design Studio is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence: | ||||
| Modeling App is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence: | ||||
|  | ||||
| - All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text" | ||||
|   - This makes version control—which is a solved problem in software engineering—trivial for CAD | ||||
| - All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood | ||||
|   - This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Design Studio | ||||
|   - This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Modeling App | ||||
| - Everything graphics _has_ to be built for the GPU | ||||
|   - Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it | ||||
| - Make the resource-intensive pieces of an application auto-scaling | ||||
| @ -19,9 +19,9 @@ Design Studio is our take on what a modern modelling experience can be. It is ap | ||||
|  | ||||
| We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours! | ||||
|  | ||||
| Design Studio is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more. | ||||
| Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more. | ||||
|  | ||||
| The 3D view in Design Studio is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine. | ||||
| The 3D view in Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine. | ||||
|  | ||||
| ## Tools | ||||
|  | ||||
| @ -198,13 +198,13 @@ If the prompt doesn't show up, start the app in command line to grab the electro | ||||
|  | ||||
| ``` | ||||
| # Windows (PowerShell) | ||||
| & 'C:\Program Files\Zoo Design Studio\Zoo Design Studio.exe' | ||||
| & 'C:\Program Files\Zoo Modeling App\Zoo Modeling App.exe' | ||||
|  | ||||
| # macOS | ||||
| /Applications/Zoo\ Modeling\ App.app/Contents/MacOS/Zoo\ Modeling\ App | ||||
|  | ||||
| # Linux | ||||
| ./Zoo Design Studio-{version}-{arch}-linux.AppImage | ||||
| ./Zoo Modeling App-{version}-{arch}-linux.AppImage | ||||
| ``` | ||||
|  | ||||
| #### 4. Publish the release | ||||
|  | ||||
| @ -36,9 +36,9 @@ myAngle = -120 | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [8, 0]) | ||||
|   |> angledLine(angle = abs(myAngle), length = 5) | ||||
|   |> angledLine({ angle = abs(myAngle), length = 5 }, %) | ||||
|   |> line(end = [-5, 0]) | ||||
|   |> angledLine(angle = myAngle, length = 5) | ||||
|   |> angledLine({ angle = myAngle, length = 5 }, %) | ||||
|   |> close() | ||||
|  | ||||
| baseExtrusion = extrude(sketch001, length = 5) | ||||
|  | ||||
| @ -33,7 +33,10 @@ acos(num: number): number | ||||
| ```js | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = toDegrees(acos(0.5)), length = 10) | ||||
|   |> angledLine({ | ||||
|        angle = toDegrees(acos(0.5)), | ||||
|        length = 10 | ||||
|      }, %) | ||||
|   |> line(end = [5, 0]) | ||||
|   |> line(endAbsolute = [12, 0]) | ||||
|   |> close() | ||||
|  | ||||
| @ -36,7 +36,7 @@ angleToMatchLengthX( | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [2, 5], tag = $seg01) | ||||
|   |> angledLine(angle = -angleToMatchLengthX(seg01, 7, %), endAbsoluteX = 10) | ||||
|   |> angledLineToX([-angleToMatchLengthX(seg01, 7, %), 10], %) | ||||
|   |> close() | ||||
|  | ||||
| extrusion = extrude(sketch001, length = 5) | ||||
|  | ||||
| @ -36,7 +36,10 @@ angleToMatchLengthY( | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [1, 2], tag = $seg01) | ||||
|   |> angledLine(angle = angleToMatchLengthY(seg01, 15, %), length = 5) | ||||
|   |> angledLine({ | ||||
|        angle = angleToMatchLengthY(seg01, 15, %), | ||||
|        length = 5 | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -10,13 +10,8 @@ Draw a line segment relative to the current origin using the polar measure of so | ||||
|  | ||||
| ```js | ||||
| angledLine( | ||||
|   data: AngledLineData, | ||||
|   sketch: Sketch, | ||||
|   angle: number, | ||||
|   length?: number, | ||||
|   lengthX?: number, | ||||
|   lengthY?: number, | ||||
|   endAbsoluteX?: number, | ||||
|   endAbsoluteY?: number, | ||||
|   tag?: TagDeclarator, | ||||
| ): Sketch | ||||
| ``` | ||||
| @ -26,14 +21,9 @@ angledLine( | ||||
|  | ||||
| | Name | Type | Description | Required | | ||||
| |----------|------|-------------|----------| | ||||
| | `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes | | ||||
| | `angle` | [`number`](/docs/kcl/types/number) | Which angle should the line be drawn at? | Yes | | ||||
| | `length` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No | | ||||
| | `lengthX` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No | | ||||
| | `lengthY` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No | | ||||
| | `endAbsoluteX` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No | | ||||
| | `endAbsoluteY` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `lengthAbsoluteEndX`, `lengthAbsoluteEndY` can be given. | No | | ||||
| | [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No | | ||||
| | `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes | | ||||
| | `sketch` | [`Sketch`](/docs/kcl/types/Sketch) |  | Yes | | ||||
| | [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) |  | No | | ||||
|  | ||||
| ### Returns | ||||
|  | ||||
| @ -46,7 +36,7 @@ angledLine( | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> yLine(endAbsolute = 15) | ||||
|   |> angledLine(angle = 30, length = 15) | ||||
|   |> angledLine({ angle = 30, length = 15 }, %) | ||||
|   |> line(end = [8, -10]) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
							
								
								
									
										48
									
								
								docs/kcl/angledLineOfXLength.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								docs/kcl/angledLineOfXLength.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										50
									
								
								docs/kcl/angledLineOfYLength.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								docs/kcl/angledLineOfYLength.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										48
									
								
								docs/kcl/angledLineToX.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								docs/kcl/angledLineToX.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										48
									
								
								docs/kcl/angledLineToY.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								docs/kcl/angledLineToY.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -54,7 +54,7 @@ example = extrude(exampleSketch, length = 5) | ||||
| // Add color to a revolved solid. | ||||
| sketch001 = startSketchOn(XY) | ||||
|   |> circle(center = [15, 0], radius = 5) | ||||
|   |> revolve(angle = 360, axis = Y) | ||||
|   |> revolve(angle = 360, axis = 'y') | ||||
|   |> appearance(color = '#ff0000', metalness = 90, roughness = 90) | ||||
| ``` | ||||
|  | ||||
| @ -188,9 +188,9 @@ example = extrude(exampleSketch, length = 1) | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| pipeHole = startSketchOn(XY) | ||||
|  | ||||
| @ -33,7 +33,10 @@ asin(num: number): number | ||||
| ```js | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = toDegrees(asin(0.5)), length = 20) | ||||
|   |> angledLine({ | ||||
|        angle = toDegrees(asin(0.5)), | ||||
|        length = 20 | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -33,7 +33,10 @@ atan(num: number): number | ||||
| ```js | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = toDegrees(atan(1.25)), length = 20) | ||||
|   |> angledLine({ | ||||
|        angle = toDegrees(atan(1.25)), | ||||
|        length = 20 | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -37,7 +37,10 @@ atan2( | ||||
| ```js | ||||
| sketch001 = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = toDegrees(atan2(1.25, 2)), length = 20) | ||||
|   |> angledLine({ | ||||
|        angle = toDegrees(atan2(1.25, 2)), | ||||
|        length = 20 | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -9,12 +9,9 @@ layout: manual | ||||
|  | ||||
| ### `std` | ||||
|  | ||||
| - [`X`](/docs/kcl/consts/std-X) | ||||
| - [`XY`](/docs/kcl/consts/std-XY) | ||||
| - [`XZ`](/docs/kcl/consts/std-XZ) | ||||
| - [`Y`](/docs/kcl/consts/std-Y) | ||||
| - [`YZ`](/docs/kcl/consts/std-YZ) | ||||
| - [`Z`](/docs/kcl/consts/std-Z) | ||||
|  | ||||
| ### `std::math` | ||||
|  | ||||
|  | ||||
| @ -1,15 +0,0 @@ | ||||
| --- | ||||
| title: "std::X" | ||||
| excerpt: "" | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| std::X | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -1,15 +0,0 @@ | ||||
| --- | ||||
| title: "std::Y" | ||||
| excerpt: "" | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| std::Y | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -1,15 +0,0 @@ | ||||
| --- | ||||
| title: "std::Z" | ||||
| excerpt: "" | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ```js | ||||
| std::Z | ||||
| ``` | ||||
|  | ||||
|  | ||||
| @ -17,10 +17,10 @@ std::math::E: number = 2.71828182845904523536028747135266250_ | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine( | ||||
|   |> angledLine({ | ||||
|     angle = 30, | ||||
|     length = 2 * E ^ 2, | ||||
|   ) | ||||
|   }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -18,7 +18,7 @@ std::math::PI: number = 3.14159265358979323846264338327950288_ | ||||
| circumference = 70 | ||||
|  | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|  |> circle(center = [0, 0], radius = circumference / (2 * PI)) | ||||
|  |> circle(center = [0, 0], radius = circumference/ (2 * PI)) | ||||
|  | ||||
| example = extrude(exampleSketch, length = 5) | ||||
| ``` | ||||
|  | ||||
| @ -17,10 +17,10 @@ std::math::TAU: number = 6.28318530717958647692528676655900577_ | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine( | ||||
|   |> angledLine({ | ||||
|     angle = 50, | ||||
|     length = 10 * TAU, | ||||
|   ) | ||||
|   }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -30,7 +30,7 @@ e(): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 30, length = 2 * e() ^ 2) | ||||
|   |> angledLine({ angle = 30, length = 2 * e() ^ 2 }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -30,10 +30,10 @@ getNextAdjacentEdge(tag: TagIdentifier): Uuid | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [10, 0]) | ||||
|   |> angledLine(angle = 60, length = 10) | ||||
|   |> angledLine(angle = 120, length = 10) | ||||
|   |> angledLine({ angle = 60, length = 10 }, %) | ||||
|   |> angledLine({ angle = 120, length = 10 }, %) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> angledLine(angle = 240, length = 10, tag = $referenceEdge) | ||||
|   |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) | ||||
|   |> close() | ||||
|  | ||||
| example = extrude(exampleSketch, length = 5) | ||||
|  | ||||
| @ -30,10 +30,10 @@ getOppositeEdge(tag: TagIdentifier): Uuid | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [10, 0]) | ||||
|   |> angledLine(angle = 60, length = 10) | ||||
|   |> angledLine(angle = 120, length = 10) | ||||
|   |> angledLine({ angle = 60, length = 10 }, %) | ||||
|   |> angledLine({ angle = 120, length = 10 }, %) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> angledLine(angle = 240, length = 10, tag = $referenceEdge) | ||||
|   |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) | ||||
|   |> close() | ||||
|  | ||||
| example = extrude(exampleSketch, length = 5) | ||||
|  | ||||
| @ -30,10 +30,10 @@ getPreviousAdjacentEdge(tag: TagIdentifier): Uuid | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [10, 0]) | ||||
|   |> angledLine(angle = 60, length = 10) | ||||
|   |> angledLine(angle = 120, length = 10) | ||||
|   |> angledLine({ angle = 60, length = 10 }, %) | ||||
|   |> angledLine({ angle = 120, length = 10 }, %) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> angledLine(angle = 240, length = 10, tag = $referenceEdge) | ||||
|   |> angledLine({ angle = 240, length = 10 }, %, $referenceEdge) | ||||
|   |> close() | ||||
|  | ||||
| example = extrude(exampleSketch, length = 5) | ||||
|  | ||||
							
								
								
									
										127
									
								
								docs/kcl/helix.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										127
									
								
								docs/kcl/helix.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -65,7 +65,7 @@ case = startSketchOn(-XZ) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close() | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
|  | ||||
							
								
								
									
										80
									
								
								docs/kcl/import.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								docs/kcl/import.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										40
									
								
								docs/kcl/inch.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								docs/kcl/inch.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,6 +1,6 @@ | ||||
| --- | ||||
| title: "KCL Standard Library" | ||||
| excerpt: "Documentation for the KCL standard library for the Zoo Design Studio." | ||||
| excerpt: "Documentation for the KCL standard library for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| @ -22,9 +22,6 @@ layout: manual | ||||
|   * [`string`](kcl/types/string) | ||||
|   * [`tag`](kcl/types/tag) | ||||
| * **std** | ||||
|   * [`Axis2d`](kcl/types/Axis2d) | ||||
|   * [`Axis3d`](kcl/types/Axis3d) | ||||
|   * [`Edge`](kcl/types/Edge) | ||||
|   * [`Face`](kcl/types/Face) | ||||
|   * [`Helix`](kcl/types/Helix) | ||||
|   * [`Plane`](kcl/types/Plane) | ||||
| @ -32,18 +29,19 @@ layout: manual | ||||
|   * [`Point3d`](kcl/types/Point3d) | ||||
|   * [`Sketch`](kcl/types/Sketch) | ||||
|   * [`Solid`](kcl/types/Solid) | ||||
|   * [`X`](kcl/consts/std-X) | ||||
|   * [`XY`](kcl/consts/std-XY) | ||||
|   * [`XZ`](kcl/consts/std-XZ) | ||||
|   * [`Y`](kcl/consts/std-Y) | ||||
|   * [`YZ`](kcl/consts/std-YZ) | ||||
|   * [`Z`](kcl/consts/std-Z) | ||||
|   * [`abs`](kcl/abs) | ||||
|   * [`acos`](kcl/acos) | ||||
|   * [`angleToMatchLengthX`](kcl/angleToMatchLengthX) | ||||
|   * [`angleToMatchLengthY`](kcl/angleToMatchLengthY) | ||||
|   * [`angledLine`](kcl/angledLine) | ||||
|   * [`angledLineOfXLength`](kcl/angledLineOfXLength) | ||||
|   * [`angledLineOfYLength`](kcl/angledLineOfYLength) | ||||
|   * [`angledLineThatIntersects`](kcl/angledLineThatIntersects) | ||||
|   * [`angledLineToX`](kcl/angledLineToX) | ||||
|   * [`angledLineToY`](kcl/angledLineToY) | ||||
|   * [`appearance`](kcl/appearance) | ||||
|   * [`arc`](kcl/arc) | ||||
|   * [`arcTo`](kcl/arcTo) | ||||
| @ -61,23 +59,19 @@ layout: manual | ||||
|   * [`chamfer`](kcl/chamfer) | ||||
|   * [`circleThreePoint`](kcl/circleThreePoint) | ||||
|   * [`close`](kcl/close) | ||||
|   * [`cm`](kcl/cm) | ||||
|   * [`extrude`](kcl/extrude) | ||||
|   * [`fillet`](kcl/fillet) | ||||
|   * [`floor`](kcl/floor) | ||||
|   * [`fromCm`](kcl/fromCm) | ||||
|   * [`fromFt`](kcl/fromFt) | ||||
|   * [`fromInches`](kcl/fromInches) | ||||
|   * [`fromM`](kcl/fromM) | ||||
|   * [`fromMm`](kcl/fromMm) | ||||
|   * [`fromYd`](kcl/fromYd) | ||||
|   * [`ft`](kcl/ft) | ||||
|   * [`getCommonEdge`](kcl/getCommonEdge) | ||||
|   * [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge) | ||||
|   * [`getOppositeEdge`](kcl/getOppositeEdge) | ||||
|   * [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge) | ||||
|   * [`helix`](kcl/std-helix) | ||||
|   * [`helix`](kcl/helix) | ||||
|   * [`hole`](kcl/hole) | ||||
|   * [`hollow`](kcl/hollow) | ||||
|   * [`intersect`](kcl/intersect) | ||||
|   * [`inch`](kcl/inch) | ||||
|   * [`lastSegX`](kcl/lastSegX) | ||||
|   * [`lastSegY`](kcl/lastSegY) | ||||
|   * [`legAngX`](kcl/legAngX) | ||||
| @ -89,9 +83,12 @@ layout: manual | ||||
|   * [`log`](kcl/log) | ||||
|   * [`log10`](kcl/log10) | ||||
|   * [`log2`](kcl/log2) | ||||
|   * [`m`](kcl/m) | ||||
|   * [`map`](kcl/map) | ||||
|   * [`max`](kcl/max) | ||||
|   * [`min`](kcl/min) | ||||
|   * [`mirror2d`](kcl/mirror2d) | ||||
|   * [`mm`](kcl/mm) | ||||
|   * [`offsetPlane`](kcl/offsetPlane) | ||||
|   * [`patternCircular2d`](kcl/patternCircular2d) | ||||
|   * [`patternCircular3d`](kcl/patternCircular3d) | ||||
| @ -99,6 +96,7 @@ layout: manual | ||||
|   * [`patternLinear3d`](kcl/patternLinear3d) | ||||
|   * [`patternTransform`](kcl/patternTransform) | ||||
|   * [`patternTransform2d`](kcl/patternTransform2d) | ||||
|   * [`polar`](kcl/polar) | ||||
|   * [`polygon`](kcl/polygon) | ||||
|   * [`pop`](kcl/pop) | ||||
|   * [`pow`](kcl/pow) | ||||
| @ -108,7 +106,7 @@ layout: manual | ||||
|   * [`push`](kcl/push) | ||||
|   * [`reduce`](kcl/reduce) | ||||
|   * [`rem`](kcl/rem) | ||||
|   * [`revolve`](kcl/std-revolve) | ||||
|   * [`revolve`](kcl/revolve) | ||||
|   * [`rotate`](kcl/rotate) | ||||
|   * [`round`](kcl/round) | ||||
|   * [`scale`](kcl/scale) | ||||
| @ -124,27 +122,26 @@ layout: manual | ||||
|   * [`sqrt`](kcl/sqrt) | ||||
|   * [`startProfileAt`](kcl/startProfileAt) | ||||
|   * [`startSketchOn`](kcl/startSketchOn) | ||||
|   * [`subtract`](kcl/subtract) | ||||
|   * [`sweep`](kcl/sweep) | ||||
|   * [`tangentToEnd`](kcl/tangentToEnd) | ||||
|   * [`tangentialArc`](kcl/tangentialArc) | ||||
|   * [`tangentialArcTo`](kcl/tangentialArcTo) | ||||
|   * [`tangentialArcToRelative`](kcl/tangentialArcToRelative) | ||||
|   * [`toDegrees`](kcl/toDegrees) | ||||
|   * [`toRadians`](kcl/toRadians) | ||||
|   * [`translate`](kcl/translate) | ||||
|   * [`union`](kcl/union) | ||||
|   * [`xLine`](kcl/xLine) | ||||
|   * [`yLine`](kcl/yLine) | ||||
|   * [`yd`](kcl/yd) | ||||
| * **std::math** | ||||
|   * [`E`](kcl/consts/std-math-E) | ||||
|   * [`PI`](kcl/consts/std-math-PI) | ||||
|   * [`TAU`](kcl/consts/std-math-TAU) | ||||
|   * [`cos`](kcl/std-math-cos) | ||||
|   * [`polar`](kcl/std-math-polar) | ||||
|   * [`sin`](kcl/std-math-sin) | ||||
|   * [`tan`](kcl/std-math-tan) | ||||
| * **std::sketch** | ||||
|   * [`circle`](kcl/std-sketch-circle) | ||||
|   * [`mirror2d`](kcl/std-sketch-mirror2d) | ||||
| * **std::turns** | ||||
|   * [`turns::HALF_TURN`](kcl/consts/std-turns-HALF_TURN) | ||||
|   * [`turns::QUARTER_TURN`](kcl/consts/std-turns-QUARTER_TURN) | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,6 +1,6 @@ | ||||
| --- | ||||
| title: "KCL Known Issues" | ||||
| excerpt: "Known issues with the KCL standard library for the Zoo Design Studio." | ||||
| excerpt: "Known issues with the KCL standard library for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -33,7 +33,10 @@ max(args: [number]): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 70, length = max(15, 31, 4, 13, 22)) | ||||
|   |> angledLine({ | ||||
|        angle = 70, | ||||
|        length = max(15, 31, 4, 13, 22) | ||||
|      }, %) | ||||
|   |> line(end = [20, 0]) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -33,7 +33,10 @@ min(args: [number]): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 70, length = min(15, 31, 4, 13, 22)) | ||||
|   |> angledLine({ | ||||
|        angle = 70, | ||||
|        length = min(15, 31, 4, 13, 22) | ||||
|      }, %) | ||||
|   |> line(end = [20, 0]) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
							
								
								
									
										104
									
								
								docs/kcl/mirror2d.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								docs/kcl/mirror2d.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,6 +1,6 @@ | ||||
| --- | ||||
| title: "KCL Modules" | ||||
| excerpt: "Documentation of modules for the KCL language for the Zoo Design Studio." | ||||
| excerpt: "Documentation of modules for the KCL language for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| @ -95,7 +95,7 @@ import "tests/inputs/cube.obj" | ||||
| When importing a GLTF file, the bin file will be imported as well. | ||||
|  | ||||
| Import paths are relative to the current project directory. Imports currently only work when | ||||
| using the native Design Studio, not in the browser. | ||||
| using the native Modeling App, not in the browser. | ||||
|  | ||||
| ### Supported values | ||||
|  | ||||
|  | ||||
| @ -57,7 +57,7 @@ case = startSketchOn(XY) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close(%) | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
| @ -88,7 +88,7 @@ case = startSketchOn(XY) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close(%) | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
|  | ||||
							
								
								
									
										43
									
								
								docs/kcl/polar.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								docs/kcl/polar.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -37,7 +37,7 @@ pow( | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 50, length = pow(5, 2)) | ||||
|   |> angledLine({ angle = 50, length = pow(5, 2) }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -29,8 +29,11 @@ profileStart(sketch: Sketch): [number] | ||||
| ```js | ||||
| sketch001 = startSketchOn(XY) | ||||
|   |> startProfileAt([5, 2], %) | ||||
|   |> angledLine(angle = 120, length = 50, tag = $seg01) | ||||
|   |> angledLine(angle = segAng(seg01) + 120, length = 50) | ||||
|   |> angledLine({ angle = 120, length = 50 }, %, $seg01) | ||||
|   |> angledLine({ | ||||
|        angle = segAng(seg01) + 120, | ||||
|        length = 50 | ||||
|      }, %) | ||||
|   |> line(end = profileStart(%)) | ||||
|   |> close() | ||||
|   |> extrude(length = 20) | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -78,7 +78,7 @@ assertEqual(sum, 6, 0.00001, "1 + 2 + 3 summed is 6") | ||||
| ```js | ||||
| // Declare a function that sketches a decagon. | ||||
| fn decagon(radius) { | ||||
|   // Each side of the decagon is turned this many radians from the previous angle. | ||||
|   // Each side of the decagon is turned this many degrees from the previous angle. | ||||
|   stepAngle = 1 / 10 * TAU | ||||
|  | ||||
|   // Start the decagon sketch at this point. | ||||
|  | ||||
							
								
								
									
										237
									
								
								docs/kcl/revolve.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										237
									
								
								docs/kcl/revolve.md
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -65,9 +65,9 @@ rotate( | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -90,9 +90,9 @@ sweepSketch = startSketchOn(XY) | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -115,9 +115,9 @@ sweepSketch = startSketchOn(XY) | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -151,9 +151,15 @@ cube | ||||
|  | ||||
| sketch001 = startSketchOn(XY) | ||||
| rectangleSketch = startProfileAt([-200, 23.86], sketch001) | ||||
|   |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) | ||||
|   |> angledLine([0, 73.47], %, $rectangleSegmentA001) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001) - 90, | ||||
|        50.61 | ||||
|      ], %) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001), | ||||
|        -segLen(rectangleSegmentA001) | ||||
|      ], %) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
|  | ||||
| @ -162,7 +168,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63) | ||||
| sketch002 = startSketchOn(YZ) | ||||
| sweepPath = startProfileAt([0, 0], sketch002) | ||||
|   |> yLine(length = 231.81) | ||||
|   |> tangentialArc(radius = 80, angle = -90) | ||||
|   |> tangentialArc({ radius = 80, offset = -90 }, %) | ||||
|   |> xLine(length = 384.93) | ||||
|  | ||||
| parts = sweep([rectangleSketch, circleSketch], path = sweepPath) | ||||
|  | ||||
| @ -49,9 +49,9 @@ scale( | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -85,9 +85,15 @@ cube | ||||
|  | ||||
| sketch001 = startSketchOn(XY) | ||||
| rectangleSketch = startProfileAt([-200, 23.86], sketch001) | ||||
|   |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) | ||||
|   |> angledLine([0, 73.47], %, $rectangleSegmentA001) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001) - 90, | ||||
|        50.61 | ||||
|      ], %) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001), | ||||
|        -segLen(rectangleSegmentA001) | ||||
|      ], %) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
|  | ||||
| @ -96,7 +102,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63) | ||||
| sketch002 = startSketchOn(YZ) | ||||
| sweepPath = startProfileAt([0, 0], sketch002) | ||||
|   |> yLine(length = 231.81) | ||||
|   |> tangentialArc(radius = 80, angle = -90) | ||||
|   |> tangentialArc({ radius = 80, offset = -90 }, %) | ||||
|   |> xLine(length = 384.93) | ||||
|  | ||||
| parts = sweep([rectangleSketch, circleSketch], path = sweepPath) | ||||
|  | ||||
| @ -32,9 +32,9 @@ exampleSketch = startSketchOn(XZ) | ||||
|   |> line(end = [10, 0]) | ||||
|   |> line(end = [5, 10], tag = $seg01) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> angledLine(angle = segAng(seg01), length = 10) | ||||
|   |> angledLine([segAng(seg01), 10], %) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> angledLine(angle = segAng(seg01), length = -15) | ||||
|   |> angledLine([segAng(seg01), -15], %) | ||||
|   |> close() | ||||
|  | ||||
| example = extrude(exampleSketch, length = 4) | ||||
|  | ||||
| @ -29,9 +29,9 @@ segLen(tag: TagIdentifier): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 60, length = 10, tag = $thing) | ||||
|   |> tangentialArc(angle = -120, radius = 5) | ||||
|   |> angledLine(angle = -60, length = segLen(thing)) | ||||
|   |> angledLine({ angle = 60, length = 10 }, %, $thing) | ||||
|   |> tangentialArc({ offset = -120, radius = 5 }, %) | ||||
|   |> angledLine({ angle = -60, length = segLen(thing) }, %) | ||||
|   |> close() | ||||
|  | ||||
| example = extrude(exampleSketch, length = 5) | ||||
|  | ||||
| @ -1,12 +1,12 @@ | ||||
| --- | ||||
| title: "KCL Settings" | ||||
| excerpt: "Documentation of settings for the KCL language and Zoo Design Studio." | ||||
| excerpt: "Documentation of settings for the KCL language and Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| # KCL Settings | ||||
|  | ||||
| There are three levels of settings available in Zoo Design Studio: | ||||
| There are three levels of settings available in the KittyCAD modeling application: | ||||
|  | ||||
| 1. [User Settings](/docs/kcl/settings/user): Global settings that apply to all projects, stored in `user.toml` | ||||
| 2. [Project Settings](/docs/kcl/settings/project): Settings specific to a project, stored in `project.toml` | ||||
| @ -14,7 +14,7 @@ There are three levels of settings available in Zoo Design Studio: | ||||
|  | ||||
| ## Configuration Files | ||||
|  | ||||
| Zoo Design Studio uses TOML files for configuration: | ||||
| The KittyCAD modeling app uses TOML files for configuration: | ||||
|  | ||||
| * **User Settings**: `user.toml` - See [complete documentation](/docs/kcl/settings/user) | ||||
| * **Project Settings**: `project.toml` - See [complete documentation](/docs/kcl/settings/project) | ||||
|  | ||||
| @ -35,7 +35,7 @@ base_unit = "in" | ||||
|  | ||||
| #### app | ||||
|  | ||||
| The settings for the Design Studio. | ||||
| The settings for the modeling app. | ||||
|  | ||||
|  | ||||
| **Default:** None | ||||
|  | ||||
| @ -37,7 +37,7 @@ text_wrapping = false | ||||
|  | ||||
| #### app | ||||
|  | ||||
| The settings for the Design Studio. | ||||
| The settings for the modeling app. | ||||
|  | ||||
|  | ||||
| **Default:** None | ||||
| @ -96,7 +96,7 @@ Permanently dismiss the banner warning to download the desktop app. This setting | ||||
|  | ||||
| ##### stream_idle_mode | ||||
|  | ||||
| When the user is idle, teardown the stream after some time. | ||||
| When the user is idle, and this is true, the stream will be torn down. | ||||
|  | ||||
|  | ||||
| **Default:** None | ||||
|  | ||||
| @ -103,7 +103,7 @@ case = startSketchOn(-XZ) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close() | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
| @ -128,7 +128,7 @@ case = startSketchOn(XY) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close() | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
| @ -156,7 +156,7 @@ case = startSketchOn(XY) | ||||
|   |> startProfileAt([-size, -size], %) | ||||
|   |> line(end = [2 * size, 0]) | ||||
|   |> line(end = [0, 2 * size]) | ||||
|   |> tangentialArc(endAbsolute = [-size, size]) | ||||
|   |> tangentialArcTo([-size, size], %) | ||||
|   |> close() | ||||
|   |> extrude(length = 65) | ||||
|  | ||||
|  | ||||
| @ -33,7 +33,7 @@ sqrt(num: number): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 50, length = sqrt(2500)) | ||||
|   |> angledLine({ angle = 50, length = sqrt(2500) }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -146,7 +146,7 @@ exampleSketch = startSketchOn(XY) | ||||
|   |> line(end = [-2, 0]) | ||||
|   |> close() | ||||
|  | ||||
| example = revolve(exampleSketch, axis = Y, angle = 180) | ||||
| example = revolve(exampleSketch, axis = 'y', angle = 180) | ||||
|  | ||||
| exampleSketch002 = startSketchOn(example, 'end') | ||||
|   |> startProfileAt([4.5, -5], %) | ||||
| @ -177,7 +177,7 @@ exampleSketch = startSketchOn(XY) | ||||
|  | ||||
| example = revolve( | ||||
|   exampleSketch, | ||||
|   axis = Y, | ||||
|   axis = 'y', | ||||
|   angle = 180, | ||||
|   tagEnd = $end01, | ||||
| ) | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -29,10 +29,10 @@ cos(@num: number(rad)): number(_) | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine( | ||||
|   |> angledLine({ | ||||
|     angle = 30, | ||||
|     length = 3 / cos(toRadians(30)), | ||||
|   ) | ||||
|   }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -29,10 +29,10 @@ tan(@num: number(rad)): number(_) | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine( | ||||
|   |> angledLine({ | ||||
|     angle = 50, | ||||
|     length = 50 * tan(1/2), | ||||
|   ) | ||||
|   }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -6,16 +6,10 @@ layout: manual | ||||
|  | ||||
|  | ||||
|  | ||||
| Construct a 2-dimensional circle, of the specified radius, centered at | ||||
| the provided (x, y) origin point. | ||||
| Construct a 2-dimensional circle, of the specified radius, centered atthe provided (x, y) origin point. | ||||
|  | ||||
| ```js | ||||
| circle( | ||||
|   @sketch_or_surface: Sketch | Plane | Face, | ||||
|   center: Point2d, | ||||
|   radius: number, | ||||
|   tag?: tag, | ||||
| ): Sketch | ||||
| circle(@sketch_or_surface: Sketch | Plane | Face, center: Point2d, radius: number, tag?: tag): Sketch | ||||
| ``` | ||||
|  | ||||
|  | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										72189
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
							
						
						
									
										72189
									
								
								docs/kcl/std.json
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -47,9 +47,9 @@ sweep( | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -74,7 +74,7 @@ helixPath = helix( | ||||
|   revolutions = 4, | ||||
|   length = 10, | ||||
|   radius = 5, | ||||
|   axis = Z, | ||||
|   axis = 'Z', | ||||
| ) | ||||
|  | ||||
| // Create a spring by sweeping around the helix path. | ||||
| @ -91,9 +91,15 @@ springSketch = startSketchOn(YZ) | ||||
|  | ||||
| sketch001 = startSketchOn(XY) | ||||
| rectangleSketch = startProfileAt([-200, 23.86], sketch001) | ||||
|   |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) | ||||
|   |> angledLine([0, 73.47], %, $rectangleSegmentA001) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001) - 90, | ||||
|        50.61 | ||||
|      ], %) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001), | ||||
|        -segLen(rectangleSegmentA001) | ||||
|      ], %) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
|  | ||||
| @ -102,7 +108,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63) | ||||
| sketch002 = startSketchOn(YZ) | ||||
| sweepPath = startProfileAt([0, 0], sketch002) | ||||
|   |> yLine(length = 231.81) | ||||
|   |> tangentialArc(radius = 80, angle = -90) | ||||
|   |> tangentialArc({ radius = 80, offset = -90 }, %) | ||||
|   |> xLine(length = 384.93) | ||||
|  | ||||
| sweep([rectangleSketch, circleSketch], path = sweepPath) | ||||
| @ -120,7 +126,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63) | ||||
| sketch002 = startSketchOn(YZ) | ||||
| sweepPath = startProfileAt([0, 0], sketch002) | ||||
|   |> yLine(length = 231.81) | ||||
|   |> tangentialArc(radius = 80, angle = -90) | ||||
|   |> tangentialArc({ radius = 80, offset = -90 }, %) | ||||
|   |> xLine(length = 384.93) | ||||
|  | ||||
| sweep(circleSketch, path = sweepPath, sectional = true) | ||||
|  | ||||
| @ -31,9 +31,12 @@ tangentToEnd(tag: TagIdentifier): number | ||||
| pillSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [20, 0]) | ||||
|   |> tangentialArc(end = [0, 10], tag = $arc1) | ||||
|   |> angledLine(angle = tangentToEnd(arc1), length = 20) | ||||
|   |> tangentialArc(end = [0, -10]) | ||||
|   |> tangentialArcToRelative([0, 10], %, $arc1) | ||||
|   |> angledLine({ | ||||
|        angle = tangentToEnd(arc1), | ||||
|        length = 20 | ||||
|      }, %) | ||||
|   |> tangentialArcToRelative([0, -10], %) | ||||
|   |> close() | ||||
|  | ||||
| pillExtrude = extrude(pillSketch, length = 10) | ||||
| @ -46,9 +49,12 @@ pillExtrude = extrude(pillSketch, length = 10) | ||||
| pillSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [0, 20]) | ||||
|   |> tangentialArc(endAbsolute = [10, 20], tag = $arc1) | ||||
|   |> angledLine(angle = tangentToEnd(arc1), length = 20) | ||||
|   |> tangentialArc(end = [-10, 0]) | ||||
|   |> tangentialArcTo([10, 20], %, $arc1) | ||||
|   |> angledLine({ | ||||
|        angle = tangentToEnd(arc1), | ||||
|        length = 20 | ||||
|      }, %) | ||||
|   |> tangentialArcToRelative([-10, 0], %) | ||||
|   |> close() | ||||
|  | ||||
| pillExtrude = extrude(pillSketch, length = 10) | ||||
| @ -60,7 +66,10 @@ pillExtrude = extrude(pillSketch, length = 10) | ||||
| rectangleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> line(end = [10, 0], tag = $seg1) | ||||
|   |> angledLine(angle = tangentToEnd(seg1), length = 10) | ||||
|   |> angledLine({ | ||||
|        angle = tangentToEnd(seg1), | ||||
|        length = 10 | ||||
|      }, %) | ||||
|   |> line(end = [0, 10]) | ||||
|   |> line(end = [-20, 0]) | ||||
|   |> close() | ||||
| @ -74,7 +83,7 @@ rectangleExtrude = extrude(rectangleSketch, length = 10) | ||||
| bottom = startSketchOn(XY) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> arcTo({ end = [10, 10], interior = [5, 1] }, %, $arc1) | ||||
|   |> angledLine(angle = tangentToEnd(arc1), length = 20) | ||||
|   |> angledLine([tangentToEnd(arc1), 20], %) | ||||
|   |> close() | ||||
| ``` | ||||
|  | ||||
| @ -86,7 +95,7 @@ circSketch = startSketchOn(XY) | ||||
|  | ||||
| triangleSketch = startSketchOn(XY) | ||||
|   |> startProfileAt([-5, 0], %) | ||||
|   |> angledLine(angle = tangentToEnd(circ), length = 10) | ||||
|   |> angledLine([tangentToEnd(circ), 10], %) | ||||
|   |> line(end = [-15, 0]) | ||||
|   |> close() | ||||
| ``` | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -35,7 +35,7 @@ tangentialArcTo( | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 60, length = 10) | ||||
|   |> angledLine({ angle = 60, length = 10 }, %) | ||||
|   |> tangentialArcTo([15, 15], %) | ||||
|   |> line(end = [10, -15]) | ||||
|   |> close() | ||||
|  | ||||
| @ -35,7 +35,7 @@ tangentialArcToRelative( | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 45, length = 10) | ||||
|   |> angledLine({ angle = 45, length = 10 }, %) | ||||
|   |> tangentialArcToRelative([0, -10], %) | ||||
|   |> line(end = [-10, 0]) | ||||
|   |> close() | ||||
|  | ||||
| @ -30,7 +30,7 @@ tau(): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 50, length = 10 * tau()) | ||||
|   |> angledLine({ angle = 50, length = 10 * tau() }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -33,7 +33,10 @@ toDegrees(num: number): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 50, length = 70 * cos(toDegrees(pi() / 4))) | ||||
|   |> angledLine({ | ||||
|        angle = 50, | ||||
|        length = 70 * cos(toDegrees(pi() / 4)) | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -33,7 +33,10 @@ toRadians(num: number): number | ||||
| ```js | ||||
| exampleSketch = startSketchOn(XZ) | ||||
|   |> startProfileAt([0, 0], %) | ||||
|   |> angledLine(angle = 50, length = 70 * cos(toRadians(45))) | ||||
|   |> angledLine({ | ||||
|        angle = 50, | ||||
|        length = 70 * cos(toRadians(45)) | ||||
|      }, %) | ||||
|   |> yLine(endAbsolute = 0) | ||||
|   |> close() | ||||
|  | ||||
|  | ||||
| @ -45,9 +45,9 @@ translate( | ||||
| sweepPath = startSketchOn(XZ) | ||||
|   |> startProfileAt([0.05, 0.05], %) | ||||
|   |> line(end = [0, 7]) | ||||
|   |> tangentialArc(angle = 90, radius = 5) | ||||
|   |> tangentialArc({ offset = 90, radius = 5 }, %) | ||||
|   |> line(end = [-3, 0]) | ||||
|   |> tangentialArc(angle = -90, radius = 5) | ||||
|   |> tangentialArc({ offset = -90, radius = 5 }, %) | ||||
|   |> line(end = [0, 7]) | ||||
|  | ||||
| // Create a hole for the pipe. | ||||
| @ -86,9 +86,15 @@ cube | ||||
|  | ||||
| sketch001 = startSketchOn(XY) | ||||
| rectangleSketch = startProfileAt([-200, 23.86], sketch001) | ||||
|   |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 50.61) | ||||
|   |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001)) | ||||
|   |> angledLine([0, 73.47], %, $rectangleSegmentA001) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001) - 90, | ||||
|        50.61 | ||||
|      ], %) | ||||
|   |> angledLine([ | ||||
|        segAng(rectangleSegmentA001), | ||||
|        -segLen(rectangleSegmentA001) | ||||
|      ], %) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
|  | ||||
| @ -97,7 +103,7 @@ circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63) | ||||
| sketch002 = startSketchOn(YZ) | ||||
| sweepPath = startProfileAt([0, 0], sketch002) | ||||
|   |> yLine(length = 231.81) | ||||
|   |> tangentialArc(radius = 80, angle = -90) | ||||
|   |> tangentialArc({ radius = 80, offset = -90 }, %) | ||||
|   |> xLine(length = 384.93) | ||||
|  | ||||
| parts = sweep([rectangleSketch, circleSketch], path = sweepPath) | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| --- | ||||
| title: "KCL Types" | ||||
| excerpt: "Documentation of types for the KCL standard library for the Zoo Design Studio." | ||||
| excerpt: "Documentation of types for the KCL standard library for the Zoo Modeling App." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| @ -184,17 +184,15 @@ way: | ||||
| ```norun | ||||
| startSketchOn('XZ') | ||||
|   |> startProfileAt(origin, %) | ||||
|   |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|   |> angledLine( | ||||
|   |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|   |> angledLine({ | ||||
|        angle = segAng(rectangleSegmentA001) - 90, | ||||
|        length = 196.99, | ||||
|        tag = $rectangleSegmentB001, | ||||
|      ) | ||||
|   |> angledLine( | ||||
|      }, %, $rectangleSegmentB001) | ||||
|   |> angledLine({ | ||||
|        angle = segAng(rectangleSegmentA001), | ||||
|        length = -segLen(rectangleSegmentA001), | ||||
|        tag = $rectangleSegmentC001, | ||||
|      ) | ||||
|      }, %, $rectangleSegmentC001) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
| ``` | ||||
| @ -219,17 +217,15 @@ However if the code was written like this: | ||||
| fn rect(origin) { | ||||
|   return startSketchOn('XZ') | ||||
|     |> startProfileAt(origin, %) | ||||
|     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|     |> angledLine( | ||||
|     |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001) - 90, | ||||
|          length = 196.99, | ||||
|          tag = $rectangleSegmentB001, | ||||
|        ) | ||||
|     |> angledLine( | ||||
|          length = 196.99 | ||||
|        }, %, $rectangleSegmentB001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001), | ||||
|          length = -segLen(rectangleSegmentA001) | ||||
|          tag = $rectangleSegmentC001, | ||||
|        ) | ||||
|        }, %, $rectangleSegmentC001) | ||||
|     |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|     |> close() | ||||
| } | ||||
| @ -249,17 +245,15 @@ For example the following code works. | ||||
| fn rect(origin) { | ||||
|   return startSketchOn('XZ') | ||||
|     |> startProfileAt(origin, %) | ||||
|     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|     |> angledLine( | ||||
|     |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001) - 90, | ||||
|          length = 196.99, | ||||
|          tag = $rectangleSegmentB001, | ||||
|        ) | ||||
|     |> angledLine( | ||||
|          length = 196.99 | ||||
|        }, %, $rectangleSegmentB001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001), | ||||
|          length = -segLen(rectangleSegmentA001) | ||||
|          tag = $rectangleSegmentC001, | ||||
|        ) | ||||
|        }, %, $rectangleSegmentC001) | ||||
|     |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|     |> close() | ||||
| } | ||||
|  | ||||
| @ -1,12 +0,0 @@ | ||||
| --- | ||||
| title: "std::Axis2d" | ||||
| excerpt: "An infinite line in 2d space." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| An infinite line in 2d space. | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -1,12 +0,0 @@ | ||||
| --- | ||||
| title: "std::Axis3d" | ||||
| excerpt: "An infinite line in 3d space." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| An infinite line in 3d space. | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -1,12 +0,0 @@ | ||||
| --- | ||||
| title: "std::Edge" | ||||
| excerpt: "The edge of a solid." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| The edge of a solid. | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @ -252,7 +252,7 @@ Data for an imported geometry. | ||||
|  | ||||
| | Property | Type | Description | Required | | ||||
| |----------|------|-------------|----------| | ||||
| | `type` |enum: `ImportedGeometry`|  | No | | ||||
| | `type` |enum: [`ImportedGeometry`](/docs/kcl/types/ImportedGeometry)|  | No | | ||||
| | `id` |[`string`](/docs/kcl/types/string)| The ID of the imported geometry. | No | | ||||
| | `value` |`[` [`string`](/docs/kcl/types/string) `]`| The original file paths. | No | | ||||
|  | ||||
|  | ||||
							
								
								
									
										22
									
								
								docs/kcl/types/PolarCoordsData.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/kcl/types/PolarCoordsData.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| --- | ||||
| title: "PolarCoordsData" | ||||
| excerpt: "Data for polar coordinates." | ||||
| layout: manual | ||||
| --- | ||||
|  | ||||
| Data for polar coordinates. | ||||
|  | ||||
| **Type:** `object` | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ## Properties | ||||
|  | ||||
| | Property | Type | Description | Required | | ||||
| |----------|------|-------------|----------| | ||||
| | `angle` |[`number`](/docs/kcl/types/number)| The angle of the line (in degrees). | No | | ||||
| | `length` |[`number`](/docs/kcl/types/number)| The length of the line. | No | | ||||
|  | ||||
|  | ||||
| @ -14,17 +14,15 @@ way: | ||||
| ```js | ||||
| startSketchOn('XZ') | ||||
|   |> startProfileAt(origin, %) | ||||
|   |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|   |> angledLine( | ||||
|   |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|   |> angledLine({ | ||||
|        angle = segAng(rectangleSegmentA001) - 90, | ||||
|        length = 196.99, | ||||
|        tag = $rectangleSegmentB001, | ||||
|      ) | ||||
|   |> angledLine( | ||||
|      }, %, $rectangleSegmentB001) | ||||
|   |> angledLine({ | ||||
|        angle = segAng(rectangleSegmentA001), | ||||
|        length = -segLen(rectangleSegmentA001), | ||||
|        tag = $rectangleSegmentC001, | ||||
|      ) | ||||
|      }, %, $rectangleSegmentC001) | ||||
|   |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|   |> close() | ||||
| ``` | ||||
| @ -48,16 +46,15 @@ However if the code was written like this: | ||||
| fn rect(origin) { | ||||
|   return startSketchOn('XZ') | ||||
|     |> startProfileAt(origin, %) | ||||
|     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|     |> angledLine( | ||||
|     |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001) - 90, | ||||
|          length = 196.99, | ||||
|          tag = $rectangleSegmentB001) | ||||
|     |> angledLine( | ||||
|          length = 196.99 | ||||
|        }, %, $rectangleSegmentB001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001), | ||||
|          length = -segLen(rectangleSegmentA001), | ||||
|          tag = $rectangleSegmentC001 | ||||
|        ) | ||||
|          length = -segLen(rectangleSegmentA001) | ||||
|        }, %, $rectangleSegmentC001) | ||||
|     |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|     |> close() | ||||
| } | ||||
| @ -77,15 +74,15 @@ For example the following code works. | ||||
| fn rect(origin) { | ||||
|   return startSketchOn('XZ') | ||||
|     |> startProfileAt(origin, %) | ||||
|     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001) | ||||
|     |> angledLine( | ||||
|     |> angledLine({angle = 0, length = 191.26}, %, $rectangleSegmentA001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001) - 90, | ||||
|          length = 196.99 | ||||
|        , %, $rectangleSegmentB001) | ||||
|     |> angledLine( | ||||
|        }, %, $rectangleSegmentB001) | ||||
|     |> angledLine({ | ||||
|          angle = segAng(rectangleSegmentA001), | ||||
|          length = -segLen(rectangleSegmentA001) | ||||
|        , %, $rectangleSegmentC001) | ||||
|        }, %, $rectangleSegmentC001) | ||||
|     |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) | ||||
|     |> close() | ||||
| } | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	