Compare commits

..

2 Commits

Author SHA1 Message Date
c42903d2e8 Merge branch 'main' into kurt-web-app-oauth 2025-06-06 14:28:39 +10:00
d98669fb8a web app oauth 2025-06-06 13:35:11 +10:00
1617 changed files with 11657934 additions and 11867427 deletions

View File

@ -9,7 +9,6 @@ VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
VITE_KC_SITE_APP_URL=https://app.dev.zoo.dev VITE_KC_SITE_APP_URL=https://app.dev.zoo.dev
VITE_KC_SKIP_AUTH=false VITE_KC_SKIP_AUTH=false
VITE_KC_CONNECTION_TIMEOUT_MS=5000 VITE_KC_CONNECTION_TIMEOUT_MS=5000
#VITE_WASM_URL="optional way of overriding the wasm url, particular for unit tests which need this if you running not on the default 3000 port"
#VITE_KC_DEV_TOKEN="optional token to skip auth in the app" #VITE_KC_DEV_TOKEN="optional token to skip auth in the app"
#token="required token for playwright. TODO: clean up env vars in #3973" #token="required token for playwright. TODO: clean up env vars in #3973"

3
.github/CODEOWNERS vendored
View File

@ -1,3 +0,0 @@
* @KittyCAD/frontend
/src/ @KittyCAD/frontend
/rust/ @KittyCAD/kcl

View File

@ -1,41 +0,0 @@
---
name: Release
about: Create a new release for the Zoo Design Studio
title: "Cut release v1.?.?"
labels: [meta/release]
---
> Instructions: https://github.com/KittyCAD/modeling-app/blob/main/CONTRIBUTING.md#shipping-releases
---
# Manual Checklist
Release builds URL: ???
## Windows via ???
* [ ] Download the release build for this platform
* [ ] Confirm the application opens (dismiss the updater)
* [ ] Create a project with a basic Text-to-CAD prompt
* [ ] Confirm the result is viewable in an engine stream
* [ ] Use 'Check for updates' to bring back the updater toast
* [ ] Confirm the app can update to the previous release
## macOS via ???
* [ ] Download the release build for this platform
* [ ] Confirm the application opens (dismiss the updater)
* [ ] Create a project with a basic Text-to-CAD prompt
* [ ] Confirm the result is viewable in an engine stream
* [ ] Use 'Check for updates' to bring back the updater toast
* [ ] Confirm the app can update to the previous release
## Linux via ???
* [ ] Download the release build for this platform
* [ ] Confirm the application opens (dismiss the updater)
* [ ] Create a project with a basic Text-to-CAD prompt
* [ ] Confirm the result is viewable in an engine stream
* [ ] Use 'Check for updates' to bring back the updater toast
* [ ] Confirm the app can update to the previous release

View File

@ -10,7 +10,7 @@ on:
env: env:
IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} IS_RELEASE: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
IS_STAGING: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} IS_NIGHTLY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -43,7 +43,7 @@ jobs:
- name: Download Wasm Cache - name: Download Wasm Cache
id: download-wasm id: download-wasm
if: ${{ github.event_name == 'pull_request' && steps.filter.outputs.rust == 'false' }} if: ${{ github.event_name == 'pull_request' && steps.filter.outputs.rust == 'false' }}
uses: dawidd6/action-download-artifact@v11 uses: dawidd6/action-download-artifact@v7
continue-on-error: true continue-on-error: true
with: with:
github_token: ${{secrets.GITHUB_TOKEN}} github_token: ${{secrets.GITHUB_TOKEN}}
@ -91,14 +91,14 @@ jobs:
if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }} if: ${{ steps.wasm.outputs.should-build-wasm == 'true' }}
run: "npm run build:wasm" run: "npm run build:wasm"
- name: Set staging version, product name, release notes, and icons - name: Set nightly version, product name, release notes, and icons
if: ${{ env.IS_STAGING == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
run: | run: |
COMMIT=$(git rev-parse --short HEAD) COMMIT=$(git rev-parse --short HEAD)
DATE=$(date +'%-y.%-m.%-d') DATE=$(date +'%-y.%-m.%-d')
export VERSION=$DATE-main.$COMMIT export VERSION=$DATE-main.$COMMIT
npm run files:set-version npm run files:set-version
npm run files:flip-to-staging npm run files:flip-to-nightly
- name: Set release version - name: Set release version
if: ${{ env.IS_RELEASE == 'true' }} if: ${{ env.IS_RELEASE == 'true' }}
@ -130,14 +130,13 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: namespace-profile-macos-6-cores - os: macos-14
platform: macos platform: mac
- os: namespace-profile-windows-4-cores - os: windows-2022
platform: windows platform: win
- os: ubuntu-22.04 - os: ubuntu-22.04
platform: linux platform: linux
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: build-apps (${{ matrix.platform }})
env: env:
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }} VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
steps: steps:
@ -167,14 +166,14 @@ jobs:
- run: npm install - run: npm install
- name: Prepare certificate and variables (Windows only) - name: Prepare certificate and variables (Windows only)
if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.platform == 'windows' }} if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
run: | run: |
echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /c/Certificate_pkcs12.p12 echo "${{secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
cat /c/Certificate_pkcs12.p12 cat /d/Certificate_pkcs12.p12
echo "::set-output name=version::${GITHUB_REF#refs/tags/v}" echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV" echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV" echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=C:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV" echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV" echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
@ -182,7 +181,7 @@ jobs:
shell: bash shell: bash
- name: Setup certicate with SSM KSP (Windows only) - name: Setup certicate with SSM KSP (Windows only)
if: ${{ (env.IS_RELEASE == 'true' || env.IS_STAGING == 'true') && matrix.platform == 'windows' }} if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
run: | run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn msiexec /i smtools-windows-x64.msi /quiet /qn
@ -192,7 +191,7 @@ jobs:
smksp_cert_sync.exe smksp_cert_sync.exe
smctl windows certsync smctl windows certsync
# This last line `smctl windows certsync` was added after windows codesign failures started happening # This last line `smctl windows certsync` was added after windows codesign failures started happening
# with staging-v25.4.10. It looks like `smksp_cert_sync.exe` used to do the sync to the local cert store, # 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 # 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 # 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. # seems to be doing that extra sync that we need for scripts/sign-win.js to work.
@ -200,13 +199,13 @@ jobs:
shell: cmd shell: cmd
- name: Build the app (debug) - name: Build the app (debug)
if: ${{ env.IS_RELEASE == 'false' && env.IS_STAGING == 'false' }} if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }}
# electron-builder doesn't have a concept of release vs debug, # electron-builder doesn't have a concept of release vs debug,
# this is just not doing any codesign or release yml generation, and points to dev infra # this is just not doing any codesign or release yml generation, and points to dev infra
run: npm run tronb:package:dev run: npm run tronb:package:dev
- name: Build the app (release) - name: Build the app (release)
if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }} if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
env: env:
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
@ -216,7 +215,7 @@ jobs:
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }} CSC_KEYCHAIN: ${{ secrets.APPLE_SIGNING_IDENTITY }}
WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }} WINDOWS_CERTIFICATE_THUMBPRINT: ${{ secrets.WINDOWS_CERTIFICATE_THUMBPRINT }}
run: npm run tronb:package:${{ env.IS_STAGING == 'true' && 'dev' || 'prod' }} run: npm run tronb:package:prod
- name: List artifacts in out/ - name: List artifacts in out/
run: ls -R out run: ls -R out
@ -240,20 +239,20 @@ jobs:
out/*-x86_64-linux.* out/*-x86_64-linux.*
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: ${{ env.IS_RELEASE == 'true' || env.IS_STAGING == 'true' }} if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
with: with:
name: out-yml-${{ matrix.platform }} name: out-yml-${{ matrix.platform }}
path: | path: |
out/latest*.yml out/latest*.yml
# TODO: add the 'Build for Mac TestFlight' stage back # TODO: add the 'Build for Mac TestFlight (nightly)' stage back
upload-apps-release: upload-apps-release:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
# Equivalent to IS_RELEASE || IS_STAGING (but we can't access those env vars here) # Equivalent to IS_RELEASE || IS_NIGHTLY (but we can't access those env vars here)
if: ${{ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} if: ${{ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
env: env:
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }} VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
@ -264,32 +263,32 @@ jobs:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-arm64-windows name: out-arm64-win
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-x64-windows name: out-x64-win
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-yml-windows name: out-yml-win
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-arm64-macos name: out-arm64-mac
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-x64-macos name: out-x64-mac
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-yml-macos name: out-yml-mac
path: out path: out
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
@ -311,8 +310,8 @@ jobs:
env: env:
NOTES: ${{ needs.prepare-files.outputs.notes }} NOTES: ${{ needs.prepare-files.outputs.notes }}
PUB_DATE: ${{ github.event.repository.updated_at }} PUB_DATE: ${{ github.event.repository.updated_at }}
WEBSITE_DIR: ${{ env.IS_STAGING == 'true' && 'dl.zoo.dev/releases/modeling-app/staging' || 'dl.zoo.dev/releases/modeling-app' }} WEBSITE_DIR: ${{ env.IS_NIGHTLY == 'true' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }}
URL_CODED_NAME: ${{ env.IS_STAGING == 'true' && 'Zoo%20Design%20Studio%20%28Staging%29' || 'Zoo%20Design%20Studio' }} URL_CODED_NAME: ${{ env.IS_NIGHTLY == 'true' && 'Zoo%20Design%20Studio%20%28Nightly%29' || 'Zoo%20Design%20Studio' }}
run: | run: |
RELEASE_DIR=https://${WEBSITE_DIR} RELEASE_DIR=https://${WEBSITE_DIR}
jq --null-input \ jq --null-input \
@ -361,26 +360,26 @@ jobs:
run: "ls -R out" run: "ls -R out"
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
if: ${{ env.IS_STAGING == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: 'google-github-actions/auth@v2.1.10' uses: 'google-github-actions/auth@v2.1.8'
with: with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
- name: Set up Google Cloud SDK - name: Set up Google Cloud SDK
if: ${{ env.IS_STAGING == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: google-github-actions/setup-gcloud@v2.1.4 uses: google-github-actions/setup-gcloud@v2.1.4
with: with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }} project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
- name: Upload staging files to public bucket - name: Upload nightly files to public bucket
if: ${{ env.IS_STAGING == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: google-github-actions/upload-cloud-storage@v2.2.2 uses: google-github-actions/upload-cloud-storage@v2.2.2
with: with:
path: out path: out
glob: '*' glob: '*'
parent: false parent: false
destination: 'dl.kittycad.io/releases/modeling-app/staging' destination: 'dl.kittycad.io/releases/modeling-app/nightly'
- name: Invalidate bucket cache on latest*.yml and last_download.json files - name: Invalidate bucket cache on latest*.yml and last_download.json files
if: ${{ env.IS_STAGING == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
run: npm run files:invalidate-bucket:staging run: npm run files:invalidate-bucket:nightly

View File

@ -31,15 +31,15 @@ jobs:
- name: Use correct Rust toolchain - name: Use correct Rust toolchain
shell: bash shell: bash
run: | run: |
cp .github/workflows/nightly-rust-toolchain.toml rust-toolchain.toml [ -e rust-toolchain.toml ] || cp rust/rust-toolchain.toml ./
- name: Install rust - name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
cache-workspaces: rust cache-workspaces: rust
components: rustfmt components: rustfmt
- name: Run nightly cargo fmt - name: Run cargo fmt
run: | run: |
cd rust cd rust
cargo +nightly fmt -- --check cargo fmt -- --check
shell: bash shell: bash

View File

@ -25,8 +25,8 @@ jobs:
- runner=8cpu-linux-x64 - runner=8cpu-linux-x64
- extras=s3-cache - extras=s3-cache
steps: steps:
- uses: runs-on/action@v2 - uses: runs-on/action@v1
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
@ -149,8 +149,8 @@ jobs:
partitionIndex: [1, 2, 3, 4, 5, 6] partitionIndex: [1, 2, 3, 4, 5, 6]
partitionTotal: [6] partitionTotal: [6]
steps: steps:
- uses: runs-on/action@v2 - uses: runs-on/action@v1
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
@ -207,8 +207,8 @@ jobs:
- runner=32cpu-linux-x64 - runner=32cpu-linux-x64
- extras=s3-cache - extras=s3-cache
steps: steps:
- uses: runs-on/action@v2 - uses: runs-on/action@v1
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}

View File

@ -46,7 +46,7 @@ jobs:
- name: Download Wasm cache - name: Download Wasm cache
id: download-wasm id: download-wasm
if: ${{ github.event_name != 'schedule' && steps.filter.outputs.rust == 'false' }} if: ${{ github.event_name != 'schedule' && steps.filter.outputs.rust == 'false' }}
uses: dawidd6/action-download-artifact@v11 uses: dawidd6/action-download-artifact@v7
continue-on-error: true continue-on-error: true
with: with:
github_token: ${{secrets.GITHUB_TOKEN}} github_token: ${{secrets.GITHUB_TOKEN}}
@ -95,8 +95,7 @@ jobs:
shell: bash shell: bash
run: npm run build:wasm run: npm run build:wasm
- name: Upload compiled wasm artifacts - uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
with: with:
name: prepared-wasm name: prepared-wasm
path: | path: |
@ -110,7 +109,7 @@ jobs:
steps: steps:
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
@ -177,18 +176,17 @@ jobs:
CI_SUITE: e2e:snapshots CI_SUITE: e2e:snapshots
TARGET: web TARGET: web
- name: Upload playwright report - uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4 if: ${{ !cancelled() && (success() || failure()) }}
if: ${{ !cancelled() }}
with: with:
name: playwright-report-snapshot-${{ github.sha }} name: playwright-report-ubuntu-snapshot-${{ github.sha }}
path: playwright-report/ path: playwright-report/
include-hidden-files: true include-hidden-files: true
retention-days: 30 retention-days: 30
overwrite: true overwrite: true
- name: Check diff - name: Check diff
if: ${{ always() && github.ref != 'refs/heads/main' }} if: ${{ github.ref != 'refs/heads/main' }}
shell: bash shell: bash
id: git-check id: git-check
run: | run: |
@ -199,7 +197,7 @@ jobs:
fi fi
- name: Commit changes - name: Commit changes
if: ${{ always() && steps.git-check.outputs.modified == 'true' }} if: ${{ steps.git-check.outputs.modified == 'true' }}
shell: bash shell: bash
run: | run: |
git add e2e/playwright/snapshot-tests.spec.ts-snapshots e2e/playwright/snapshots git add e2e/playwright/snapshot-tests.spec.ts-snapshots e2e/playwright/snapshots
@ -222,7 +220,7 @@ jobs:
include: include:
- os: "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64" - os: "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
- os: namespace-profile-macos-8-cores - os: namespace-profile-macos-8-cores
- os: namespace-profile-windows-8-cores - os: windows-latest-8-cores
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: e2e:web (${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }}) name: e2e:web (${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }})
env: env:
@ -230,7 +228,7 @@ jobs:
steps: steps:
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
@ -292,11 +290,9 @@ jobs:
CI_SUITE: e2e:web CI_SUITE: e2e:web
TARGET: web TARGET: web
- name: Upload playwright report - uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
if: ${{ !cancelled() && (success() || failure()) }} if: ${{ !cancelled() && (success() || failure()) }}
with: with:
name: playwright-report-web-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }}
path: playwright-report/ path: playwright-report/
include-hidden-files: true include-hidden-files: true
retention-days: 30 retention-days: 30
@ -308,6 +304,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# TODO: enable namespace-profile-windows-latest once available
include: include:
- os: "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64" - os: "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
shardIndex: 1 shardIndex: 1
@ -339,10 +336,10 @@ jobs:
- os: namespace-profile-macos-8-cores - os: namespace-profile-macos-8-cores
shardIndex: 2 shardIndex: 2
shardTotal: 2 shardTotal: 2
- os: namespace-profile-windows-8-cores - os: windows-latest-8-cores
shardIndex: 1 shardIndex: 1
shardTotal: 2 shardTotal: 2
- os: namespace-profile-windows-8-cores - os: windows-latest-8-cores
shardIndex: 2 shardIndex: 2
shardTotal: 2 shardTotal: 2
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -418,21 +415,19 @@ jobs:
CI_SUITE: e2e:desktop CI_SUITE: e2e:desktop
TARGET: desktop TARGET: desktop
- name: Upload test report - uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: test-results-desktop-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }} name: test-results-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }}
path: test-results/ path: test-results/
include-hidden-files: true include-hidden-files: true
retention-days: 30 retention-days: 30
overwrite: true overwrite: true
- name: Upload playwright report - uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: playwright-report-desktop-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }} name: playwright-report-${{ env.OS_NAME }}-${{ matrix.shardIndex }}-${{ github.sha }}
path: playwright-report/ path: playwright-report/
include-hidden-files: true include-hidden-files: true
retention-days: 30 retention-days: 30

View File

@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/create-github-app-token@v2 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
# required # required

View File

@ -328,7 +328,7 @@ jobs:
mkdir -p releases/language-server/${{ env.TAG }} mkdir -p releases/language-server/${{ env.TAG }}
cp -r build/* releases/language-server/${{ env.TAG }} cp -r build/* releases/language-server/${{ env.TAG }}
- name: "Authenticate to Google Cloud" - name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2.1.10" uses: "google-github-actions/auth@v2.1.8"
with: with:
credentials_json: "${{ secrets.GOOGLE_CLOUD_DL_SA }}" credentials_json: "${{ secrets.GOOGLE_CLOUD_DL_SA }}"
- name: Set up Cloud SDK - name: Set up Cloud SDK

View File

@ -113,7 +113,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install uv - name: Install uv
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@just - uses: taiki-e/install-action@just
- name: Run tests - name: Run tests
@ -130,7 +130,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install the latest version of uv - name: Install the latest version of uv
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v5
- name: Install codespell - name: Install codespell
run: | run: |
uv venv .venv uv venv .venv
@ -161,7 +161,7 @@ jobs:
with: with:
path: rust/kcl-python-bindings path: rust/kcl-python-bindings
- name: Install the latest version of uv - name: Install the latest version of uv
uses: astral-sh/setup-uv@v6 uses: astral-sh/setup-uv@v5
- name: do uv things - name: do uv things
run: | run: |
cd rust/kcl-python-bindings cd rust/kcl-python-bindings

View File

@ -1,3 +0,0 @@
[toolchain]
channel = "nightly"
components = ["rustfmt"]

View File

@ -31,42 +31,42 @@ jobs:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-arm64-windows name: out-arm64-win
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-x64-windows name: out-x64-win
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-yml-windows name: out-yml-win
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-arm64-macos name: out-arm64-mac
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-x64-macos name: out-x64-mac
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: out-yml-macos name: out-yml-mac
path: out path: out
run-id: ${{ steps.tag_workflow_id.outputs.id }} run-id: ${{ steps.tag_workflow_id.outputs.id }}
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
@ -108,7 +108,7 @@ jobs:
run: npm run files:set-notes run: npm run files:set-notes
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2.1.10' uses: 'google-github-actions/auth@v2.1.8'
with: with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'

View File

@ -251,8 +251,7 @@ Before you submit a contribution PR to this repo, please ensure that:
#### 1. Create a 'Cut release $VERSION' issue #### 1. Create a 'Cut release $VERSION' issue
Use the **Release** issue template. It will be used to document changelog discussions and release testing.
This will be used to facilitate changelog discussions and release testing.
https://github.com/KittyCAD/modeling-app/issues/new https://github.com/KittyCAD/modeling-app/issues/new
@ -271,18 +270,33 @@ The workflow should be listed right away [in this list](https://github.com/Kitty
#### 3. Manually test artifacts #### 3. Manually test artifacts
##### Release builds
The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in step 2). The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in step 2).
Assign someone to each section of the manual checklist generated by the issue template. Manually test against [this list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the issue.
A prompt should show up asking for a downgrade to the last release version. Running through that at the end of testing
and making sure the current release candidate has the ability to be updated to what electron-updater points to is critical,
but what is actually being downloaded and installed isn't.
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing.
```
# Windows (PowerShell)
& 'C:\Program Files\Zoo Design Studio\Zoo Design Studio.exe'
# macOS
/Applications/Zoo\ Modeling\ App.app/Contents/MacOS/Zoo\ Modeling\ App
# Linux
./Zoo Design Studio-{version}-{arch}-linux.AppImage
```
#### 4. Bump the KCL version #### 4. Bump the KCL version
Follow the instructions [here](./rust/README.md) to publish new crates. Follow the instructions [here](./rust/README.md) to publish new crates.
This ensures that the KCL accepted by the app is also accepted by the CLI. This ensures that the KCL accepted by the app is also accepted by the CLI.
If there are documentation changes, merge the corresponding Dependabot PRs [here](https://github.com/KittyCAD/website/pulls/app%2Fdependabot) for the website.
You can trigger Dependabot to check for updates [here](https://github.com/KittyCAD/website/network/updates/17261214/jobs).
#### 5. Publish the release #### 5. Publish the release
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the **Release title** field as well. Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the **Release title** field as well.

View File

@ -62,10 +62,7 @@ else
endif endif
public/kcl-samples/manifest.json: $(KCL_SOURCES) public/kcl-samples/manifest.json: $(KCL_SOURCES)
ifndef WINDOWS
cd rust/kcl-lib && EXPECTORATE=overwrite cargo test generate_manifest cd rust/kcl-lib && EXPECTORATE=overwrite cargo test generate_manifest
@ touch $@
endif
.vite/build/main.js: $(REACT_SOURCES) $(TYPESCRIPT_SOURCES) $(VITE_SOURCES) .vite/build/main.js: $(REACT_SOURCES) $(TYPESCRIPT_SOURCES) $(VITE_SOURCES)
npm run tronb:vite:dev npm run tronb:vite:dev

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 259 KiB

View File

@ -46,7 +46,3 @@ KCL has no support for area, volume, or other higher dimension units. When inter
## Explicit conversions ## Explicit conversions
You might sometimes need to convert from one unit to another for some calculation. You can do this implicitly when calling a function (see above), but if you can't or don't want to, then you can use the explicit conversion functions in the [`std::units`](/docs/kcl-std/modules/std-units) module. You might sometimes need to convert from one unit to another for some calculation. You can do this implicitly when calling a function (see above), but if you can't or don't want to, then you can use the explicit conversion functions in the [`std::units`](/docs/kcl-std/modules/std-units) module.
KCL cannot know about changes to units caused by arithmetic. For example, you may intend for `10in * 25.4` to be the value `254mm` (i.e., `10in` in mm), however, the result of that computation in KCL is `254in`. It is always better to rely on automatic conversion or to use the explicit conversion functions, where possible.
Converting between degrees and radians using π ([`PI`](/docs/kcl-std/consts/std-math-PI) in KCL) is especially prone to this error and so the `PI` constant always requires specifying units of any computation it is used with. E.g., `radius = (circumference / (2 * PI)): number(mm)`.

View File

@ -4,6 +4,8 @@ excerpt: "Project specific settings for the app. These live in `project.toml` in
layout: manual layout: manual
--- ---
# Project Settings
Project specific settings for the app. These live in `project.toml` in the base of the project directory. Updating the settings for the project in the app will update this file automatically. Do not edit this file manually, as it may be overwritten by the app. Manual edits can cause corruption of the settings file. Project specific settings for the app. These live in `project.toml` in the base of the project directory. Updating the settings for the project in the app will update this file automatically. Do not edit this file manually, as it may be overwritten by the app. Manual edits can cause corruption of the settings file.
## Project Configuration Structure ## Project Configuration Structure
@ -182,4 +184,4 @@ color = 240.0
# Use inches as the default measurement unit # Use inches as the default measurement unit
base_unit = "in" base_unit = "in"
``` ```

View File

@ -4,6 +4,8 @@ excerpt: "User specific settings for the app. These live in `user.toml` in the a
layout: manual layout: manual
--- ---
# User Settings
User specific settings for the app. These live in `user.toml` in the app's configuration directory. Updating the settings in the app will update this file automatically. Do not edit this file manually, as it may be overwritten by the app. Manual edits can cause corruption of the settings file. User specific settings for the app. These live in `user.toml` in the app's configuration directory. Updating the settings in the app will update this file automatically. Do not edit this file manually, as it may be overwritten by the app. Manual edits can cause corruption of the settings file.
## User Configuration Structure ## User Configuration Structure
@ -83,13 +85,6 @@ Allow orbiting in sketch mode.
Whether to show the debug panel, which lets you see various states of the app to aid in development. Whether to show the debug panel, which lets you see various states of the app to aid in development.
**Default:** None
##### fixed_size_grid
If true, the grid cells will be fixed-size, where the width is your default length unit. If false, the grid will get larger as you zoom out, and smaller as you zoom in.
**Default:** None **Default:** None
@ -239,4 +234,4 @@ base_unit = "mm"
# Disable text wrapping in the editor # Disable text wrapping in the editor
text_wrapping = false text_wrapping = false
``` ```

View File

@ -44,7 +44,7 @@ detail on importing geometry.
Tags are used to give a name (tag) to a specific path. Tags are used to give a name (tag) to a specific path.
### Tag declarations - `TagDecl` ### `TagDeclarator`
The syntax for declaring a tag is `$myTag` you would use it in the following The syntax for declaring a tag is `$myTag` you would use it in the following
way: way:
@ -67,28 +67,24 @@ startSketchOn(XZ)
|> close() |> close()
``` ```
When a function requires declaring a new tag (using the `$` syntax), the argument has type [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl). ### `TagIdentifier`
### Tag identifiers As per the example above you can use the tag identifier to get a reference to the
tagged object. The syntax for this is `myTag`.
A tag created using a tag declarator can be used by writing its name without the `$`, e.g., `myTag`. In the example above we use the tag identifier to get the angle of the segment
Where necessary to disambiguate from tag declarations, we call these tag identifiers. `segAng(rectangleSegmentA001)`.
In the example above we use the tag identifier `rectangleSegmentA001` to get the angle of the segment ### `Start`
using `segAng(rectangleSegmentA001)`.
Tags can identify either an edge or face of a solid, or a line or other edge of a sketch. Functions There is a special tag, `START` (with type `Start`, although under the cover, it's a string)
which take a tag identifier as an argument will use either [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) (for the edge of a for identifying the face of a solid which was the start of an extrusion (i.e., the surface which
solid or sketch) or [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace). is extruded).
If a line in a sketch is tagged and then the sketch is extruded, the tag is a `TaggedEdge` before ### `End`
extrusion and a `TaggedFace` after extrusion.
#### `START` and `END`
[`START`](/docs/kcl-std/consts/std-START) and [`END`](/docs/kcl-std/consts/std-END) are special tags
for identifying the starting and ending faces of an extruded solid.
There is a special tag, `END` (with type `End`, although under the cover, it's a string)
for identifying the face of a solid which was finishes an extrusion.
### Tag Scope ### Tag Scope

File diff suppressed because one or more lines are too long

33
docs/kcl-std/consts.md Normal file
View File

@ -0,0 +1,33 @@
---
title: "KCL Constants"
excerpt: "Documentation for the KCL constants."
layout: manual
---
## Table of Contents
### `std`
- [`END`](/docs/kcl/consts/std-END)
- [`START`](/docs/kcl/consts/std-START)
- [`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`
- [`E`](/docs/kcl/consts/std-math-E)
- [`PI`](/docs/kcl/consts/std-math-PI)
- [`TAU`](/docs/kcl/consts/std-math-TAU)
### `std::turns`
- [`HALF_TURN`](/docs/kcl/consts/std-turns-HALF_TURN)
- [`QUARTER_TURN`](/docs/kcl/consts/std-turns-QUARTER_TURN)
- [`THREE_QUARTER_TURN`](/docs/kcl/consts/std-turns-THREE_QUARTER_TURN)
- [`ZERO`](/docs/kcl/consts/std-turns-ZERO)

View File

@ -8,13 +8,9 @@ layout: manual
Identifies the ending face of an extrusion. I.e., the new face created by an extrusion. Identifies the ending face of an extrusion. I.e., the new face created by an extrusion.
```kcl ```kcl
END: TaggedFace END: string = 'end'
``` ```
### Type
[`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) - A tag which references a face of a solid, including the distinguished tags `START` and `END`.

View File

@ -8,13 +8,9 @@ layout: manual
Identifies the starting face of an extrusion. I.e., the face which is extruded. Identifies the starting face of an extrusion. I.e., the face which is extruded.
```kcl ```kcl
START: TaggedFace START: string = 'start'
``` ```
### Type
[`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) - A tag which references a face of a solid, including the distinguished tags `START` and `END`.

View File

@ -8,13 +8,9 @@ layout: manual
The X-axis (can be used in both 2d and 3d contexts). The X-axis (can be used in both 2d and 3d contexts).
```kcl ```kcl
X: Axis3d X
``` ```
### Type
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.

View File

@ -8,13 +8,9 @@ layout: manual
An abstract 3d plane aligned with the X and Y axes. Its normal is the positive Z axis. An abstract 3d plane aligned with the X and Y axes. Its normal is the positive Z axis.
```kcl ```kcl
XY: Plane XY
``` ```
### Type
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.

View File

@ -8,13 +8,9 @@ layout: manual
An abstract 3d plane aligned with the X and Z axes. Its normal is the negative Y axis. An abstract 3d plane aligned with the X and Z axes. Its normal is the negative Y axis.
```kcl ```kcl
XZ: Plane XZ
``` ```
### Type
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.

View File

@ -8,13 +8,9 @@ layout: manual
The Y-axis (can be used in both 2d and 3d contexts). The Y-axis (can be used in both 2d and 3d contexts).
```kcl ```kcl
Y: Axis3d Y
``` ```
### Type
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.

View File

@ -8,13 +8,9 @@ layout: manual
An abstract 3d plane aligned with the Y and Z axes. Its normal is the positive X axis. An abstract 3d plane aligned with the Y and Z axes. Its normal is the positive X axis.
```kcl ```kcl
YZ: Plane YZ
``` ```
### Type
[`Plane`](/docs/kcl-std/types/std-types-Plane) - An abstract plane.

View File

@ -8,13 +8,9 @@ layout: manual
The 3D Z-axis. The 3D Z-axis.
```kcl ```kcl
Z: Axis3d Z
``` ```
### Type
[`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) - An abstract and infinite line in 3d space.

View File

@ -13,16 +13,12 @@ E: number = 2.71828182845904523536028747135266250_
### Type
[`number`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 30deg, length = 2 * E ^ 2) |> angledLine(angle = 30, length = 2 * E ^ 2)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -11,17 +11,13 @@ The value of `pi`, Archimedes constant (π).
PI: number(_?) = 3.14159265358979323846264338327950288_? PI: number(_?) = 3.14159265358979323846264338327950288_?
``` ```
`PI` is a number and is technically a ratio, so you might expect it to have type [`number(_)`](/docs/kcl-std/types/std-types-number). `PI` is a number and is technically a ratio, so you might expect it to have type `number(_)`.
However, `PI` is nearly always used for converting between different units - usually degrees to or However, `PI` is nearly always used for converting between different units - usually degrees to or
from radians. Therefore, `PI` is treated a bit specially by KCL and always has unknown units. This from radians. Therefore, `PI` is treated a bit specially by KCL and always has unknown units. This
means that if you use `PI`, you will need to give KCL some extra information about the units of numbers. means that if you use `PI`, you will need to give KCL some extra information about the units of numbers.
Usually you should use type ascription on the result of calculations, e.g., `(2 * PI): number(rad)`. Usually you should use type ascription on the result of calculations, e.g., `(2 * PI): number(rad)`.
It is better to use `units::toRadians` or `units::toDegrees` to convert between angles with You might prefer to use `units::toRadians` or `units::toDegrees` to convert between angles with
different units where possible. different units.
### Type
[`number(_?)`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples

View File

@ -13,16 +13,12 @@ TAU: number = 6.28318530717958647692528676655900577_
### Type
[`number`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = 10 * TAU) |> angledLine(angle = 50, length = 10 * TAU)
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -13,8 +13,4 @@ sweep::SKETCH_PLANE: string = 'sketchPlane'
### Type
[`string`](/docs/kcl-std/types/std-types-string) - A sequence of characters

View File

@ -13,8 +13,4 @@ sweep::TRAJECTORY: string = 'trajectoryCurve'
### Type
[`string`](/docs/kcl-std/types/std-types-string) - A sequence of characters

View File

@ -13,8 +13,4 @@ turns::HALF_TURN: number(deg) = 180deg
### Type
[`number(deg)`](/docs/kcl-std/types/std-types-number) - A number.

View File

@ -13,8 +13,4 @@ turns::QUARTER_TURN: number(deg) = 90deg
### Type
[`number(deg)`](/docs/kcl-std/types/std-types-number) - A number.

View File

@ -13,8 +13,4 @@ turns::THREE_QUARTER_TURN: number(deg) = 270deg
### Type
[`number(deg)`](/docs/kcl-std/types/std-types-number) - A number.

View File

@ -8,13 +8,9 @@ layout: manual
No turn, zero degrees/radians. No turn, zero degrees/radians.
```kcl ```kcl
turns::ZERO: number(Angle) turns::ZERO: number = 0
``` ```
### Type
[`number(Angle)`](/docs/kcl-std/types/std-types-number) - A number.

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@ abs(@input: number): number
### Examples ### Examples
```kcl ```kcl
myAngle = -120deg myAngle = -120
sketch001 = startSketchOn(XZ) sketch001 = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])

View File

@ -8,7 +8,7 @@ layout: manual
Compute the cosine of a number. Compute the cosine of a number.
```kcl ```kcl
cos(@num: number(Angle)): number cos(@num: number(Angle)): number(_)
``` ```
@ -21,7 +21,7 @@ cos(@num: number(Angle)): number
### Returns ### Returns
[`number`](/docs/kcl-std/types/std-types-number) - A number. [`number(_)`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples
@ -29,7 +29,7 @@ cos(@num: number(Angle)): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 30deg, length = 3 / cos(30deg)) |> angledLine(angle = 30, length = 3 / cos(30deg))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,7 +29,7 @@ max(@input: [number; 1+]): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 70deg, length = max([15, 31, 4, 13, 22])) |> angledLine(angle = 70, length = max([15, 31, 4, 13, 22]))
|> line(end = [20, 0]) |> line(end = [20, 0])
|> close() |> close()

View File

@ -29,7 +29,7 @@ min(@input: [number; 1+]): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 70deg, length = min([15, 31, 4, 13, 22])) |> angledLine(angle = 70, length = min([15, 31, 4, 13, 22]))
|> line(end = [20, 0]) |> line(end = [20, 0])
|> close() |> close()

View File

@ -33,7 +33,7 @@ polar(
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> line(end = polar(angle = 30deg, length = 5), tag = $thing) |> line(end = polar(angle = 30, length = 5), tag = $thing)
|> line(end = [0, 5]) |> line(end = [0, 5])
|> line(end = [segEndX(thing), 0]) |> line(end = [segEndX(thing), 0])
|> line(end = [-20, 10]) |> line(end = [-20, 10])

View File

@ -33,7 +33,7 @@ pow(
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = pow(5, exp = 2)) |> angledLine(angle = 50, length = pow(5, exp = 2))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -8,7 +8,7 @@ layout: manual
Compute the sine of a number. Compute the sine of a number.
```kcl ```kcl
sin(@num: number(Angle)): number sin(@num: number(Angle)): number(_)
``` ```
@ -21,7 +21,7 @@ sin(@num: number(Angle)): number
### Returns ### Returns
[`number`](/docs/kcl-std/types/std-types-number) - A number. [`number(_)`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples
@ -29,7 +29,7 @@ sin(@num: number(Angle)): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = 15 / sin(135deg)) |> angledLine(angle = 50, length = 15 / sin(135deg))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,7 +29,7 @@ sqrt(@input: number): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = sqrt(2500)) |> angledLine(angle = 50, length = sqrt(2500))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -8,7 +8,7 @@ layout: manual
Compute the tangent of a number. Compute the tangent of a number.
```kcl ```kcl
tan(@num: number(Angle)): number tan(@num: number(Angle)): number(_)
``` ```
@ -21,7 +21,7 @@ tan(@num: number(Angle)): number
### Returns ### Returns
[`number`](/docs/kcl-std/types/std-types-number) - A number. [`number(_)`](/docs/kcl-std/types/std-types-number) - A number.
### Examples ### Examples
@ -29,7 +29,7 @@ tan(@num: number(Angle)): number
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = 50 * tan((1 / 2): number(rad))) |> angledLine(angle = 50, length = 50 * tan((1 / 2): number(rad)))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ angledLine(
lengthY?: number(Length), lengthY?: number(Length),
endAbsoluteX?: number(Length), endAbsoluteX?: number(Length),
endAbsoluteY?: number(Length), endAbsoluteY?: number(Length),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -33,7 +33,7 @@ angledLine(
| `lengthY` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No | | `lengthY` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteX` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No | | `endAbsoluteX` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteY` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No | | `endAbsoluteY` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns
@ -46,7 +46,7 @@ angledLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> yLine(endAbsolute = 15) |> yLine(endAbsolute = 15)
|> angledLine(angle = 30deg, length = 15) |> angledLine(angle = 30, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -11,9 +11,9 @@ Draw an angled line from the current origin, constructing a line segment such th
angledLineThatIntersects( angledLineThatIntersects(
@sketch: Sketch, @sketch: Sketch,
angle: number(Angle), angle: number(Angle),
intersectTag: TaggedEdge, intersectTag: tag,
offset?: number(Length), offset?: number(Length),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -25,9 +25,9 @@ angledLineThatIntersects(
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes | | `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `intersectTag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The tag of the line to intersect with. | Yes | | `intersectTag` | [`tag`](/docs/kcl-std/types/std-types-tag) | The tag of the line to intersect with. | Yes |
| `offset` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The offset from the intersecting line. | No | | `offset` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The offset from the intersecting line. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns
@ -42,7 +42,7 @@ exampleSketch = startSketchOn(XZ)
|> line(endAbsolute = [5, 10]) |> line(endAbsolute = [5, 10])
|> line(endAbsolute = [-10, 10], tag = $lineToIntersect) |> line(endAbsolute = [-10, 10], tag = $lineToIntersect)
|> line(endAbsolute = [0, 20]) |> line(endAbsolute = [0, 20])
|> angledLineThatIntersects(angle = 80deg, intersectTag = lineToIntersect, offset = 10) |> angledLineThatIntersects(angle = 80, intersectTag = lineToIntersect, offset = 10)
|> close() |> close()
example = extrude(exampleSketch, length = 10) example = extrude(exampleSketch, length = 10)

View File

@ -16,7 +16,7 @@ arc(
diameter?: number(Length), diameter?: number(Length),
interiorAbsolute?: Point2d, interiorAbsolute?: Point2d,
endAbsolute?: Point2d, endAbsolute?: Point2d,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -40,7 +40,7 @@ for to construct your shape, you're likely looking for tangentialArc.
| `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How large should the circle be? Incompatible with `radius`. | No | | `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How large should the circle be? Incompatible with `radius`. | No |
| `interiorAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd`. | No | | `interiorAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd`. | No |
| `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd`. | No | | `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this arc. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this arc. | No |
### Returns ### Returns
@ -53,7 +53,7 @@ for to construct your shape, you're likely looking for tangentialArc.
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> line(end = [10, 0]) |> line(end = [10, 0])
|> arc(angleStart = 0, angleEnd = 280deg, radius = 16) |> arc(angleStart = 0, angleEnd = 280, radius = 16)
|> close() |> close()
example = extrude(exampleSketch, length = 10) example = extrude(exampleSketch, length = 10)

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ circle(
center: Point2d, center: Point2d,
radius?: number(Length), radius?: number(Length),
diameter?: number(Length), diameter?: number(Length),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -27,7 +27,7 @@ circle(
| `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center of the circle. | Yes | | `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center of the circle. | Yes |
| `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the circle. Incompatible with `diameter`. | No | | `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the circle. Incompatible with `diameter`. | No |
| `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The diameter of the circle. Incompatible with `radius`. | No | | `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The diameter of the circle. Incompatible with `radius`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this circle. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this circle. | No |
### Returns ### Returns

View File

@ -13,7 +13,7 @@ circleThreePoint(
p1: Point2d, p1: Point2d,
p2: Point2d, p2: Point2d,
p3: Point2d, p3: Point2d,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -27,7 +27,7 @@ circleThreePoint(
| `p1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 1st point to derive the circle. | Yes | | `p1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 1st point to derive the circle. | Yes |
| `p2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 2nd point to derive the circle. | Yes | | `p2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 2nd point to derive the circle. | Yes |
| `p3` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 3rd point to derive the circle. | Yes | | `p3` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 3rd point to derive the circle. | Yes |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Identifier for the circle to reference elsewhere. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Identifier for the circle to reference elsewhere. | No |
### Returns ### Returns

View File

@ -10,7 +10,7 @@ Construct a line segment from the current origin back to the profile's origin, e
```kcl ```kcl
close( close(
@sketch: Sketch, @sketch: Sketch,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -24,7 +24,7 @@ starting point.
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch you want to close. | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch you want to close. | Yes |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ layout: manual
Get the shared edge between two faces. Get the shared edge between two faces.
```kcl ```kcl
getCommonEdge(faces: [TaggedFace; 2]): Edge getCommonEdge(faces: [tag; 2]): Edge
``` ```
@ -17,7 +17,7 @@ getCommonEdge(faces: [TaggedFace; 2]): Edge
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `faces` | `[TaggedFace; 2]` | The tags of the faces you want to find the common edge between. | Yes | | `faces` | `[tag; 2]` | The tags of the faces you want to find the common edge between. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Get the next adjacent edge to the edge given. Get the next adjacent edge to the edge given.
```kcl ```kcl
getNextAdjacentEdge(@edge: TaggedEdge): Edge getNextAdjacentEdge(@edge: tag): Edge
``` ```
@ -17,7 +17,7 @@ getNextAdjacentEdge(@edge: TaggedEdge): Edge
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `edge` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The tag of the edge you want to find the next adjacent edge of. | Yes | | `edge` | [`tag`](/docs/kcl-std/types/std-types-tag) | The tag of the edge you want to find the next adjacent edge of. | Yes |
### Returns ### Returns
@ -30,10 +30,10 @@ getNextAdjacentEdge(@edge: TaggedEdge): Edge
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine(angle = 60deg, length = 10) |> angledLine(angle = 60, length = 10)
|> angledLine(angle = 120deg, length = 10) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine(angle = 240deg, length = 10, tag = $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -8,7 +8,7 @@ layout: manual
Get the opposite edge to the edge given. Get the opposite edge to the edge given.
```kcl ```kcl
getOppositeEdge(@edge: TaggedEdge): Edge getOppositeEdge(@edge: tag): Edge
``` ```
@ -17,7 +17,7 @@ getOppositeEdge(@edge: TaggedEdge): Edge
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `edge` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The tag of the edge you want to find the opposite edge of. | Yes | | `edge` | [`tag`](/docs/kcl-std/types/std-types-tag) | The tag of the edge you want to find the opposite edge of. | Yes |
### Returns ### Returns
@ -30,10 +30,10 @@ getOppositeEdge(@edge: TaggedEdge): Edge
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine(angle = 60deg, length = 10) |> angledLine(angle = 60, length = 10)
|> angledLine(angle = 120deg, length = 10) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine(angle = 240deg, length = 10, tag = $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -8,7 +8,7 @@ layout: manual
Get the previous adjacent edge to the edge given. Get the previous adjacent edge to the edge given.
```kcl ```kcl
getPreviousAdjacentEdge(@edge: TaggedEdge): Edge getPreviousAdjacentEdge(@edge: tag): Edge
``` ```
@ -17,7 +17,7 @@ getPreviousAdjacentEdge(@edge: TaggedEdge): Edge
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `edge` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The tag of the edge you want to find the previous adjacent edge of. | Yes | | `edge` | [`tag`](/docs/kcl-std/types/std-types-tag) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
### Returns ### Returns
@ -30,10 +30,10 @@ getPreviousAdjacentEdge(@edge: TaggedEdge): Edge
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> line(end = [10, 0]) |> line(end = [10, 0])
|> angledLine(angle = 60deg, length = 10) |> angledLine(angle = 60, length = 10)
|> angledLine(angle = 120deg, length = 10) |> angledLine(angle = 120, length = 10)
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> angledLine(angle = 240deg, length = 10, tag = $referenceEdge) |> angledLine(angle = 240, length = 10, tag = $referenceEdge)
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -10,13 +10,11 @@ Extend the current sketch with a new involute circular curve.
```kcl ```kcl
involuteCircular( involuteCircular(
@sketch: Sketch, @sketch: Sketch,
startRadius: number(Length),
endRadius: number(Length),
angle: number(Angle), angle: number(Angle),
startRadius?: number(Length),
endRadius?: number(Length),
startDiameter?: number(Length),
endDiameter?: number(Length),
reverse?: bool, reverse?: bool,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -27,13 +25,11 @@ involuteCircular(
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `startRadius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, start_radius is the radius of the inner circle. | Yes |
| `endRadius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, end_radius is the radius of the outer circle. | Yes |
| `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes | | `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes |
| `startRadius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, startRadius is the radius of the inner circle. Either `startRadius` or `startDiameter` must be given (but not both). | No |
| `endRadius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, endRadius is the radius of the outer circle. Either `endRadius` or `endDiameter` must be given (but not both). | No |
| `startDiameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, startDiameter describes the inner circle. Either `startRadius` or `startDiameter` must be given (but not both). | No |
| `endDiameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The involute is described between two circles, endDiameter describes the outer circle. Either `endRadius` or `endDiameter` must be given (but not both). | No |
| `reverse` | [`bool`](/docs/kcl-std/types/std-types-bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. | No | | `reverse` | [`bool`](/docs/kcl-std/types/std-types-bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns
@ -47,11 +43,11 @@ a = 10
b = 14 b = 14
startSketchOn(XZ) startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> involuteCircular(startRadius = a, endRadius = b, angle = 60deg) |> involuteCircular(startRadius = a, endRadius = b, angle = 60)
|> involuteCircular( |> involuteCircular(
startRadius = a, startRadius = a,
endRadius = b, endRadius = b,
angle = 60deg, angle = 60,
reverse = true, reverse = true,
) )

View File

@ -12,7 +12,7 @@ line(
@sketch: Sketch, @sketch: Sketch,
endAbsolute?: Point2d, endAbsolute?: Point2d,
end?: Point2d, end?: Point2d,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -25,7 +25,7 @@ line(
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Which absolute point should this line go to? Incompatible with `end`. | No | | `endAbsolute` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Which absolute point should this line go to? Incompatible with `end`. | No |
| `end` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No | | `end` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ profileStart(@profile: Sketch): Point2d
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfile(at = [5, 2]) |> startProfile(at = [5, 2])
|> angledLine(angle = 120, length = 50, tag = $seg01) |> angledLine(angle = 120, length = 50, tag = $seg01)
|> angledLine(angle = segAng(seg01) + 120deg, length = 50) |> angledLine(angle = segAng(seg01) + 120, length = 50)
|> line(end = profileStart(%)) |> line(end = profileStart(%))
|> close() |> close()
|> extrude(length = 20) |> extrude(length = 20)

View File

@ -30,8 +30,8 @@ profileStartX(@profile: Sketch): number(Length)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfile(at = [5, 2]) |> startProfile(at = [5, 2])
|> angledLine(angle = -26.6, length = 50) |> angledLine(angle = -26.6, length = 50)
|> angledLine(angle = 90deg, length = 50) |> angledLine(angle = 90, length = 50)
|> angledLine(angle = 30deg, endAbsoluteX = profileStartX(%)) |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
``` ```

View File

@ -29,8 +29,8 @@ profileStartY(@profile: Sketch): number(Length)
```kcl ```kcl
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> startProfile(at = [5, 2]) |> startProfile(at = [5, 2])
|> angledLine(angle = -60deg, length = 14) |> angledLine(angle = -60, length = 14)
|> angledLine(angle = 30deg, endAbsoluteY = profileStartY(%)) |> angledLine(angle = 30, endAbsoluteY = profileStartY(%))
``` ```

View File

@ -15,8 +15,8 @@ revolve(
tolerance?: number(Length), tolerance?: number(Length),
symmetric?: bool, symmetric?: bool,
bidirectionalAngle?: number(Angle), bidirectionalAngle?: number(Angle),
tagStart?: TagDecl, tagStart?: tag,
tagEnd?: TagDecl, tagEnd?: tag,
): [Solid; 1+] ): [Solid; 1+]
``` ```
@ -38,11 +38,11 @@ revolved around the same axis.
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes | | `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes |
| `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | Axis of revolution. | Yes | | `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | Axis of revolution. | Yes |
| `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Angle to revolve (in degrees). Default is 360. | No | | `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Angle to revolve (in degrees). Default is 360. | No |
| `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No | | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Tolerance for the revolve operation. | No |
| `symmetric` | [`bool`](/docs/kcl-std/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No | | `symmetric` | [`bool`](/docs/kcl-std/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
| `bidirectionalAngle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | If specified, will also revolve in the opposite direction to 'angle' to the specified angle. If 'symmetric' is true, this value is ignored. | No | | `bidirectionalAngle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | If specified, will also revolve in the opposite direction to 'angle' to the specified angle. If 'symmetric' is true, this value is ignored. | No |
| `tagStart` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No | | `tagStart` | [`tag`](/docs/kcl-std/types/std-types-tag) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
| `tagEnd` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | A named tag for the face at the end of the revolve. | No | | `tagEnd` | [`tag`](/docs/kcl-std/types/std-types-tag) | A named tag for the face at the end of the revolve. | No |
### Returns ### Returns
@ -62,7 +62,7 @@ part001 = startSketchOn(XY)
|> line(end = [0, -5.5]) |> line(end = [0, -5.5])
|> line(end = [-2, 0]) |> line(end = [-2, 0])
|> close() |> close()
|> revolve(axis = Y) // default angle is 360deg |> revolve(axis = Y) // default angle is 360
``` ```
@ -72,7 +72,7 @@ part001 = startSketchOn(XY)
// A donut shape. // A donut shape.
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [15, 0], radius = 5) |> circle(center = [15, 0], radius = 5)
|> revolve(angle = 360deg, axis = Y) |> revolve(angle = 360, axis = Y)
``` ```
@ -89,7 +89,7 @@ part001 = startSketchOn(XY)
|> line(end = [0, -5.5]) |> line(end = [0, -5.5])
|> line(end = [-2, 0]) |> line(end = [-2, 0])
|> close() |> close()
|> revolve(axis = Y, angle = 180deg) |> revolve(axis = Y, angle = 180)
``` ```
@ -106,7 +106,7 @@ part001 = startSketchOn(XY)
|> line(end = [0, -5.5]) |> line(end = [0, -5.5])
|> line(end = [-2, 0]) |> line(end = [-2, 0])
|> close() |> close()
|> revolve(axis = Y, angle = 180deg) |> revolve(axis = Y, angle = 180)
part002 = startSketchOn(part001, face = END) part002 = startSketchOn(part001, face = END)
|> startProfile(at = [4.5, -5]) |> startProfile(at = [4.5, -5])
@ -131,7 +131,7 @@ box = startSketchOn(XY)
sketch001 = startSketchOn(box, face = END) sketch001 = startSketchOn(box, face = END)
|> circle(center = [10, 10], radius = 4) |> circle(center = [10, 10], radius = 4)
|> revolve(angle = -90deg, axis = Y) |> revolve(angle = -90, axis = Y)
``` ```
@ -148,7 +148,7 @@ box = startSketchOn(XY)
sketch001 = startSketchOn(box, face = END) sketch001 = startSketchOn(box, face = END)
|> circle(center = [10, 10], radius = 4) |> circle(center = [10, 10], radius = 4)
|> revolve(angle = 90deg, axis = getOppositeEdge(revolveAxis)) |> revolve(angle = 90, axis = getOppositeEdge(revolveAxis))
``` ```
@ -165,7 +165,7 @@ box = startSketchOn(XY)
sketch001 = startSketchOn(box, face = END) sketch001 = startSketchOn(box, face = END)
|> circle(center = [10, 10], radius = 4) |> circle(center = [10, 10], radius = 4)
|> revolve(angle = 90deg, axis = getOppositeEdge(revolveAxis), tolerance = 0.0001) |> revolve(angle = 90, axis = getOppositeEdge(revolveAxis), tolerance = 0.0001)
``` ```
@ -229,7 +229,7 @@ profile001 = startSketchOn(XY)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [-10, 10], radius = 4) |> circle(center = [-10, 10], radius = 4)
|> revolve(angle = 90deg, axis = revolveAxis) |> revolve(angle = 90, axis = revolveAxis)
``` ```
@ -246,7 +246,7 @@ profile001 = startSketchOn(XY)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [-10, 10], radius = 4) |> circle(center = [-10, 10], radius = 4)
|> revolve(angle = 90deg, axis = revolveAxis) |> revolve(angle = 90, axis = revolveAxis)
``` ```
@ -263,7 +263,7 @@ profile001 = startSketchOn(XY)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [-10, 10], radius = 4) |> circle(center = [-10, 10], radius = 4)
|> revolve(angle = 90deg, axis = revolveAxis, symmetric = true) |> revolve(angle = 90, axis = revolveAxis, symmetric = true)
``` ```
@ -280,7 +280,7 @@ profile001 = startSketchOn(XY)
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [-10, 10], radius = 4) |> circle(center = [-10, 10], radius = 4)
|> revolve(angle = 90deg, axis = revolveAxis, bidirectionalAngle = 50) |> revolve(angle = 90, axis = revolveAxis, bidirectionalAngle = 50)
``` ```

View File

@ -8,7 +8,7 @@ layout: manual
Compute the angle (in degrees) of the provided line segment. Compute the angle (in degrees) of the provided line segment.
```kcl ```kcl
segAng(@tag: TaggedEdge): number(Angle) segAng(@tag: tag): number(Angle)
``` ```
@ -17,7 +17,7 @@ segAng(@tag: TaggedEdge): number(Angle)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the ending point of the provided line segment. Compute the ending point of the provided line segment.
```kcl ```kcl
segEnd(@tag: TaggedEdge): Point2d segEnd(@tag: tag): Point2d
``` ```
@ -17,7 +17,7 @@ segEnd(@tag: TaggedEdge): Point2d
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the ending point of the provided line segment along the 'x' axis. Compute the ending point of the provided line segment along the 'x' axis.
```kcl ```kcl
segEndX(@tag: TaggedEdge): number(Length) segEndX(@tag: tag): number(Length)
``` ```
@ -17,7 +17,7 @@ segEndX(@tag: TaggedEdge): number(Length)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the ending point of the provided line segment along the 'y' axis. Compute the ending point of the provided line segment along the 'y' axis.
```kcl ```kcl
segEndY(@tag: TaggedEdge): number(Length) segEndY(@tag: tag): number(Length)
``` ```
@ -17,7 +17,7 @@ segEndY(@tag: TaggedEdge): number(Length)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the length of the provided line segment. Compute the length of the provided line segment.
```kcl ```kcl
segLen(@tag: TaggedEdge): number(Length) segLen(@tag: tag): number(Length)
``` ```
@ -17,7 +17,7 @@ segLen(@tag: TaggedEdge): number(Length)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns
@ -30,8 +30,8 @@ segLen(@tag: TaggedEdge): number(Length)
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 60, length = 10, tag = $thing) |> angledLine(angle = 60, length = 10, tag = $thing)
|> tangentialArc(angle = -120deg, radius = 5) |> tangentialArc(angle = -120, radius = 5)
|> angledLine(angle = -60deg, length = segLen(thing)) |> angledLine(angle = -60, length = segLen(thing))
|> close() |> close()
example = extrude(exampleSketch, length = 5) example = extrude(exampleSketch, length = 5)

View File

@ -8,7 +8,7 @@ layout: manual
Compute the starting point of the provided line segment. Compute the starting point of the provided line segment.
```kcl ```kcl
segStart(@tag: TaggedEdge): Point2d segStart(@tag: tag): Point2d
``` ```
@ -17,7 +17,7 @@ segStart(@tag: TaggedEdge): Point2d
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the starting point of the provided line segment along the 'x' axis. Compute the starting point of the provided line segment along the 'x' axis.
```kcl ```kcl
segStartX(@tag: TaggedEdge): number(Length) segStartX(@tag: tag): number(Length)
``` ```
@ -17,7 +17,7 @@ segStartX(@tag: TaggedEdge): number(Length)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -8,7 +8,7 @@ layout: manual
Compute the starting point of the provided line segment along the 'y' axis. Compute the starting point of the provided line segment along the 'y' axis.
```kcl ```kcl
segStartY(@tag: TaggedEdge): number(Length) segStartY(@tag: tag): number(Length)
``` ```
@ -17,7 +17,7 @@ segStartY(@tag: TaggedEdge): number(Length)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -11,7 +11,7 @@ Start a new profile at a given point.
startProfile( startProfile(
@startProfileOn: Plane | Face, @startProfileOn: Plane | Face,
at: Point2d, at: Point2d,
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -23,7 +23,7 @@ startProfile(
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `startProfileOn` | [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | What to start the profile on. | Yes | | `startProfileOn` | [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | What to start the profile on. | Yes |
| `at` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Where to start the profile. An absolute point. | Yes | | `at` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Where to start the profile. An absolute point. | Yes |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Tag this first starting point. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Tag this first starting point. | No |
### Returns ### Returns

View File

@ -10,7 +10,7 @@ Start a new 2-dimensional sketch on a specific plane or face.
```kcl ```kcl
startSketchOn( startSketchOn(
@planeOrSolid: Solid | Plane, @planeOrSolid: Solid | Plane,
face?: TaggedFace, face?: tag,
): Plane | Face ): Plane | Face
``` ```
@ -36,7 +36,7 @@ face, since it will include all the parent faces and Solids.
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `planeOrSolid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Plane`](/docs/kcl-std/types/std-types-Plane) | Profile whose start is being used. | Yes | | `planeOrSolid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Plane`](/docs/kcl-std/types/std-types-Plane) | Profile whose start is being used. | Yes |
| `face` | [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace) | Identify a face of a solid if a solid is specified as the input argument (`planeOrSolid`). | No | | `face` | [`tag`](/docs/kcl-std/types/std-types-tag) | Identify a face of a solid if a solid is specified as the input argument (`planeOrSolid`). | No |
### Returns ### Returns
@ -156,7 +156,7 @@ exampleSketch = startSketchOn(XY)
|> line(end = [-2, 0]) |> line(end = [-2, 0])
|> close() |> close()
example = revolve(exampleSketch, axis = Y, angle = 180deg) example = revolve(exampleSketch, axis = Y, angle = 180)
exampleSketch002 = startSketchOn(example, face = END) exampleSketch002 = startSketchOn(example, face = END)
|> startProfile(at = [4.5, -5]) |> startProfile(at = [4.5, -5])
@ -189,7 +189,7 @@ exampleSketch = startSketchOn(XY)
example = revolve( example = revolve(
exampleSketch, exampleSketch,
axis = Y, axis = Y,
angle = 180deg, angle = 180,
tagEnd = $end01, tagEnd = $end01,
) )

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ layout: manual
Returns the angle coming out of the end of the segment in degrees. Returns the angle coming out of the end of the segment in degrees.
```kcl ```kcl
tangentToEnd(@tag: TaggedEdge): number(Angle) tangentToEnd(@tag: tag): number(Angle)
``` ```
@ -17,7 +17,7 @@ tangentToEnd(@tag: TaggedEdge): number(Angle)
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | The line segment being queried by its tag. | Yes |
### Returns ### Returns

View File

@ -15,7 +15,7 @@ tangentialArc(
radius?: number(Length), radius?: number(Length),
diameter?: number(Length), diameter?: number(Length),
angle?: number(Angle), angle?: number(Angle),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -35,7 +35,7 @@ for 'angle' degrees along the imaginary circle.
| `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Radius of the imaginary circle. `angle` must be given. Incompatible with `end` and `endAbsolute` and `diameter`. | No | | `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Radius of the imaginary circle. `angle` must be given. Incompatible with `end` and `endAbsolute` and `diameter`. | No |
| `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Diameter of the imaginary circle. `angle` must be given. Incompatible with `end` and `endAbsolute` and `radius`. | No | | `diameter` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Diameter of the imaginary circle. `angle` must be given. Incompatible with `end` and `endAbsolute` and `radius`. | No |
| `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Offset of the arc. `radius` must be given. Incompatible with `end` and `endAbsolute`. | No | | `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | Offset of the arc. `radius` must be given. Incompatible with `end` and `endAbsolute`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this arc. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this arc. | No |
### Returns ### Returns
@ -47,7 +47,7 @@ for 'angle' degrees along the imaginary circle.
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 45deg, length = 10) |> angledLine(angle = 45, length = 10)
|> tangentialArc(end = [0, -10]) |> tangentialArc(end = [0, -10])
|> line(end = [-10, 0]) |> line(end = [-10, 0])
|> close() |> close()
@ -61,7 +61,7 @@ example = extrude(exampleSketch, length = 10)
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 60deg, length = 10) |> angledLine(angle = 60, length = 10)
|> tangentialArc(endAbsolute = [15, 15]) |> tangentialArc(endAbsolute = [15, 15])
|> line(end = [10, -15]) |> line(end = [10, -15])
|> close() |> close()
@ -75,9 +75,9 @@ example = extrude(exampleSketch, length = 10)
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 60deg, length = 10) |> angledLine(angle = 60, length = 10)
|> tangentialArc(radius = 10, angle = -120deg) |> tangentialArc(radius = 10, angle = -120)
|> angledLine(angle = -60deg, length = 10) |> angledLine(angle = -60, length = 10)
|> close() |> close()
example = extrude(exampleSketch, length = 10) example = extrude(exampleSketch, length = 10)

View File

@ -12,7 +12,7 @@ xLine(
@sketch: Sketch, @sketch: Sketch,
length?: number(Length), length?: number(Length),
endAbsolute?: number(Length), endAbsolute?: number(Length),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -25,7 +25,7 @@ xLine(
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far away along the X axis should this line go? Incompatible with `endAbsolute`. | No | | `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far away along the X axis should this line go? Incompatible with `endAbsolute`. | No |
| `endAbsolute` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Which absolute X value should this line go to? Incompatible with `length`. | No | | `endAbsolute` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Which absolute X value should this line go to? Incompatible with `length`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns
@ -38,10 +38,10 @@ xLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> xLine(length = 15) |> xLine(length = 15)
|> angledLine(angle = 80deg, length = 15) |> angledLine(angle = 80, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> xLine(length = 10) |> xLine(length = 10)
|> angledLine(angle = 120deg, length = 30) |> angledLine(angle = 120, length = 30)
|> xLine(length = -15) |> xLine(length = -15)
|> close() |> close()

View File

@ -12,7 +12,7 @@ yLine(
@sketch: Sketch, @sketch: Sketch,
length?: number(Length), length?: number(Length),
endAbsolute?: number(Length), endAbsolute?: number(Length),
tag?: TagDecl, tag?: tag,
): Sketch ): Sketch
``` ```
@ -25,7 +25,7 @@ yLine(
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes | | `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far away along the Y axis should this line go? Incompatible with `endAbsolute`. | No | | `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far away along the Y axis should this line go? Incompatible with `endAbsolute`. | No |
| `endAbsolute` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Which absolute Y value should this line go to? Incompatible with `length`. | No | | `endAbsolute` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Which absolute Y value should this line go to? Incompatible with `length`. | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this line. | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this line. | No |
### Returns ### Returns
@ -38,7 +38,7 @@ yLine(
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> yLine(length = 15) |> yLine(length = 15)
|> angledLine(angle = 30deg, length = 15) |> angledLine(angle = 30, length = 15)
|> line(end = [8, -10]) |> line(end = [8, -10])
|> yLine(length = -5) |> yLine(length = -5)
|> close() |> close()

View File

@ -55,7 +55,7 @@ example = extrude(exampleSketch, length = 5)
// Add color to a revolved solid. // Add color to a revolved solid.
sketch001 = startSketchOn(XY) sketch001 = startSketchOn(XY)
|> circle(center = [15, 0], radius = 5) |> circle(center = [15, 0], radius = 5)
|> revolve(angle = 360deg, axis = Y) |> revolve(angle = 360, axis = Y)
|> appearance(color = '#ff0000', metalness = 90, roughness = 90) |> appearance(color = '#ff0000', metalness = 90, roughness = 90)
``` ```
@ -196,9 +196,9 @@ example = extrude(exampleSketch, length = 1)
sweepPath = startSketchOn(XZ) sweepPath = startSketchOn(XZ)
|> startProfile(at = [0.05, 0.05]) |> startProfile(at = [0.05, 0.05])
|> line(end = [0, 7]) |> line(end = [0, 7])
|> tangentialArc(angle = 90deg, radius = 5) |> tangentialArc(angle = 90, radius = 5)
|> line(end = [-3, 0]) |> line(end = [-3, 0])
|> tangentialArc(angle = -90deg, radius = 5) |> tangentialArc(angle = -90, radius = 5)
|> line(end = [0, 7]) |> line(end = [0, 7])
pipeHole = startSketchOn(XY) pipeHole = startSketchOn(XY)

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ fillet(
radius: number(Length), radius: number(Length),
tags: [Edge; 1+], tags: [Edge; 1+],
tolerance?: number(Length), tolerance?: number(Length),
tag?: TagDecl, tag?: tag,
): Solid ): Solid
``` ```
@ -28,8 +28,8 @@ will smoothly blend the transition.
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be filletted | Yes | | `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
| `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the fillet | Yes | | `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the fillet | Yes |
| `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to fillet | Yes | | `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to fillet | Yes |
| `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No | | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The tolerance for this fillet | No |
| `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this fillet | No | | [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this fillet | No |
### Returns ### Returns

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ verifying fit, and analyzing overlapping geometries in assemblies.
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `solids` | `[Solid; 2+]` | The solids to intersect. | Yes | | `solids` | `[Solid; 2+]` | The solids to intersect. | Yes |
| `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No | | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The tolerance to use for the intersection operation. | No |
### Returns ### Returns

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

View File

@ -27,7 +27,7 @@ and complex multi-body part modeling.
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `solids` | [`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid) | The solids to use as the base to subtract from. | Yes | | `solids` | [`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid) | The solids to use as the base to subtract from. | Yes |
| `tools` | [`[Solid]`](/docs/kcl-std/types/std-types-Solid) | The solids to subtract. | Yes | | `tools` | [`[Solid]`](/docs/kcl-std/types/std-types-Solid) | The solids to subtract. | Yes |
| `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No | | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The tolerance to use for the subtraction operation. | No |
### Returns ### Returns

View File

@ -21,7 +21,7 @@ union(
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `solids` | `[Solid; 2+]` | The solids to union. | Yes | | `solids` | `[Solid; 2+]` | The solids to union. | Yes |
| `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No | | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The tolerance to use for the union operation. | No |
### Returns ### Returns

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

View File

@ -29,7 +29,7 @@ units::toDegrees(@num: number(Angle)): number(deg)
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = 70 * cos(units::toDegrees((PI / 4): number(rad)))) |> angledLine(angle = 50, length = 70 * cos(units::toDegrees((PI / 4): number(rad))))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -29,7 +29,7 @@ units::toRadians(@num: number(Angle)): number(rad)
```kcl ```kcl
exampleSketch = startSketchOn(XZ) exampleSketch = startSketchOn(XZ)
|> startProfile(at = [0, 0]) |> startProfile(at = [0, 0])
|> angledLine(angle = 50deg, length = 70 * cos(units::toRadians(45deg))) |> angledLine(angle = 50, length = 70 * cos(units::toRadians(45)))
|> yLine(endAbsolute = 0) |> yLine(endAbsolute = 0)
|> close() |> close()

View File

@ -145,12 +145,12 @@ See also the [types overview](/docs/kcl-lang/types)
* [**Primitive types**](/docs/kcl-lang/types) * [**Primitive types**](/docs/kcl-lang/types)
* [`ImportedGeometry`](/docs/kcl-std/types/std-types-ImportedGeometry) * [`ImportedGeometry`](/docs/kcl-std/types/std-types-ImportedGeometry)
* [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl)
* [`any`](/docs/kcl-std/types/std-types-any) * [`any`](/docs/kcl-std/types/std-types-any)
* [`bool`](/docs/kcl-std/types/std-types-bool) * [`bool`](/docs/kcl-std/types/std-types-bool)
* [`fn`](/docs/kcl-std/types/std-types-fn) * [`fn`](/docs/kcl-std/types/std-types-fn)
* [`number`](/docs/kcl-std/types/std-types-number) * [`number`](/docs/kcl-std/types/std-types-number)
* [`string`](/docs/kcl-std/types/std-types-string) * [`string`](/docs/kcl-std/types/std-types-string)
* [`tag`](/docs/kcl-std/types/std-types-tag)
* [**std::types**](/docs/kcl-std/modules/std-types) * [**std::types**](/docs/kcl-std/modules/std-types)
* [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) * [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d)
* [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) * [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d)
@ -162,5 +162,3 @@ See also the [types overview](/docs/kcl-lang/types)
* [`Point3d`](/docs/kcl-std/types/std-types-Point3d) * [`Point3d`](/docs/kcl-std/types/std-types-Point3d)
* [`Sketch`](/docs/kcl-std/types/std-types-Sketch) * [`Sketch`](/docs/kcl-std/types/std-types-Sketch)
* [`Solid`](/docs/kcl-std/types/std-types-Solid) * [`Solid`](/docs/kcl-std/types/std-types-Solid)
* [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge)
* [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace)

Some files were not shown because too many files have changed in this diff Show More